Skip to main content

Top 10 HTML Errors

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

Last update: Wednesday, October 29, 2025

1. Duplicate ID “X”. 34.69%

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. Attribute “X” not allowed on element “Y” at this point. 26.55%

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.

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

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

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

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

5. Bad value “” for attribute “target” on element “a”: Browsing context name must be at least one character long. 3.06%

The target attribute on <a> elements can’t be blank.

6. Element X is missing one or more of the following attributes: “role”. 2.82%

An element is using ARIA attributes, but its role has not been defined. ARIA defines semantics that can be applied to elements, with these divided into roles (defining a type of user interface element) and states and properties that are supported by a role. Authors must assign an ARIA role and the appropriate states and properties to an element during its life-cycle, unless the element already has appropriate ARIA semantics (via use of an appropriate HTML element).

7. Stray end tag “X”. 2.67%

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. Bad value “rocketlazyloadscript” for attribute “type” on element “script”: Subtype missing. 2.48%

The value rocketlazyloadscript used in a <script> tag is not a valid one according to the HTML specification. It is introduced by the WP Rocket Wordpress extension.

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

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. Duplicate attribute “X”. 2.00%

Attributes in HTML elements must be unique. For example, <a id="one" id="two"> is invalid as the attribute id is repeated.

Switch to Spanish or Portuguese

Ready to validate your sites?
Start your trial today.