Skip to main content

Top 10 HTML Errors

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

Last update: Friday, May 23, 2025

1. Duplicate ID “X”. 26.91%

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

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. No space between attributes. 20.73%

Attributes in HTML elements need to be separated by space.

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

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

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

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

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

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

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

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

8. Stray end tag “X”. 2.31%

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.

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

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

Read about Using ARIA: Roles, states and properties.

10. CSS: “mso-X”: Property “mso-X” doesn't exist. 1.53%

An invalid CSS property is being used. Properties starting with mso- are commonly defined by Microsoft products like Office and Outlook.

Switch to Spanish or Portuguese

Ready to validate your sites?
Start your trial today.