Skip to main content

Top 10 HTML Issues

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

Last update: Saturday, November 23, 2024

1. Trailing slash on void elements has no effect and interacts badly with unquoted attribute values. 46.41%

Void elements, like area, base, br, col, embed, hr, img, input, link, meta, source, track, and wbr are self-closing and don’t need a trailing slash /, which should be avoided as that can interfere with unquoted attribute values.

2. The first occurrence of ID “X” was here. 12.00%

Element IDs in an HTML document must be unique. The HTML validator is indicating the first occurrence of an ID that is repeated. Check the details for that issue to see web pages affected, and the elements within them, to fix that ID repetition.

3. Duplicate ID “X”. 12.00%

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.

4. The “type” attribute is unnecessary for JavaScript resources. 10.05%

The default type for <script> tags is JavaScript, so you don’t need to include the type for JS resources.

5. Attribute “X” not allowed on element “Y” at this point. 5.18%

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.

6. No space between attributes. 4.26%

Attributes in HTML elements need to be separated by space.

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

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

8. Malformed byte sequence. 2.89%

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

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

<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.

10. Possible misuse of “aria-label”. 1.47%

The aria-label attribute is used to define a string that labels the current element. Use it in cases where a text label is not visible on the screen. This attribute does not work consistently with all HTML elements, so the W3C validator is warning about a possible misuse.

Switch to Spanish or Portuguese

Ready to validate your sites?
Start your trial today.