# V3050. Possibly an incorrect HTML. The </XX> closing tag was encountered, while the </YY> tag was expected.

The analyzer has detected a string literal containing HTML markup with errors: a closing tag required for an element does not correspond with its opening tag.

Consider the following example:

    string html = "<B><I>This is a text, in bold italics.</B>";

In this code, the opening tag "<I>" must be matched with closing tag "</I>"; instead, closing tag "</B>" is encountered further in the string. This is an error, which renders this part of the HTML code invalid.

To fix the error, correct sequences of opening and closing tags must be ensured.

This is what the fixed version of the code should look like:

    string html = "<B><I>This is a text, in bold italics.</I></B>";

You can look at examples of errors detected by the V3050 diagnostic.