HTML Guide
End tags in HTML must not have any attributes.
According to the HTML specification, only start tags (also called opening tags) may contain attributes, while end tags must appear as a plain </tagname>
with nothing else.
For example, this is invalid and will trigger the error:
<p>Welcome to the site.</p class="welcome">
Correct code removes the attribute from the end tag:
<p>Welcome to the site.</p>
If you need the element to have an attribute, only include it in the start tag:
<p class="welcome">Welcome to the site.</p>
Learn more:
Related W3C validator issues
An </a> end tag has been found to violate nesting rules. <a> tags can’t include other <a> tags inside. Most probable cause is an unclosed <a> tag, like in this example:
<a href="one.html">Page 1
<a href="two.html">Page 2</a>
An end tag </code> has been found violating nesting rules. Check other errors in the same document related to the <code> element, and fix the unallowed nested elements.
A closing </body> tag has been found, but there are unclosed elements before it. For example this has an unclosed <section> element:
<body>
<section>
</body>
And end tag has been found that does not match the current open element. Check the context to fix the start and end tags.
Attributes in HTML elements need to be separated by space, in this example the first line is invalid and the second one is valid:
<a href="page.php"class="big">link</a>
<a href="page.php" class="big">link</a>
An end tag has been found after the closing </body> tag, which breaks the expected HTML document structure.
Check out the document structure, a basic example follows:
<!DOCTYPE html>
<html lang="">
<head>
<title>Test</title>
</head>
<body>
<p></p>
</body>
</html>
Attributes for HTML elements must be defined like name="value". The name may be missing before the =.
Some examples:
<!-- Missing equal sign -->
<p name "value"></p>
<!-- Missing space before the attribute -->
<pname "value"></p>
A < character has been found when an attribute was expected instead. Check the syntax of the affected tag, it’s probably malformed and a < character inside has been interpreted as an attribute.
For example, this code might cause this issue:
<!-- Malformed img tag -->
<img src="photo.jpg" alt="smiling cat" < />
<!-- Fixed img tag -->
<img src="photo.jpg" alt="smiling cat" />
Attributes for HTML elements must be defined like name="value". A common issue is missing the =, or repeating the " like in these examples:
<!-- Missing equal sign -->
<p name "value"></p>
<!-- Repeated quotes -->
<p name="value""></p>
An end tag for X has been found that does not correspond to a previous open tag. This usually happens when you close the same tag twice, for example:
<ul>
<li>item</li>
</ul>
</ul>