Skip to main content

Top 10 HTML Errors

Web developers worldwide have found 302 million HTML issues on 10 million checked web pages.
Here are the most common issues detected by Rocket Validator.

Last update: Monday, September 16, 2024

1. Duplicate ID “X”. 29.11%

The id attribute is used to identify a single element within a document, and is required to be unique. Check the document for repeated IDs.

2. Malformed byte sequence. 17.15%

The document could not be properly parsed due to malformed characters. Check the document encoding.

3. Attribute “X” not allowed on element “Y” at this point. 13.85%

An invalid attribute has been found on an element. Check the affected tag to ensure attributes are well-formed, and if they are you can consider using custom data attributes.

4. No space between attributes. 12.30%

Attributes in HTML elements need to be separated by space.

5. Element “X” not allowed as child of element “Y” in this context. 11.34%

The element X is not allowed as a child element of Y. For example, a <ul> element cannot have a <div> child element.

6. Forbidden code point X. 4.50%

A character has been found in the document that is not allowed in the charset encoding being used.

7. Stray end tag “X”. 4.09%

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.

8. An “img” element must have an “alt” attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images. 3.80%

<img> tags, used to include images on a document, require an alt attribute to describe the contents of the image. This is essential for users that cannot see the image (like screen reader users), or as an alternate text when the image cannot be displayed.

9. The “X” attribute on the “Y” element is obsolete. Use CSS instead. 2.12%

You’re using an attribute X that is no longer valid for element Y, but you can use CSS to achieve the same effect.

10. End tag X seen, but there were open elements. 1.74%

Your HTML markup contains an end tag for X, but there are nested open elements that need to be closed first. For example, <li><span>example</li> is invalid because you need to close the <span> tag before you close the <li>. This would be valid: <li><span>example</span></li>.

Switch to Spanish or Portuguese

Ready to validate your sites?
Start your trial today.