Skip to main content

HTML Guide

End tag had attributes.

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