Top 10 HTML Issues
Web developers worldwide have found 424 million HTML issues on 12 million checked web pages.
Here are the most common issues detected by Rocket Validator.
Last update: Tuesday, February 24, 2026
1. Trailing slash on void elements has no effect and interacts badly with unquoted attribute values. 61.76%
Trailing slashes on void elements like <br/>, <img/>, or <hr/> serve no purpose in HTML and are ignored by browsers. However, they can cause subtle bugs when combined with unquoted attribute values, because the slash may be parsed as part of the last attribute’s value rather than as a self-closing indicator. The simplest fix is to remove trailing slashes from all void elements.
2. Element “X” not allowed as child of element “Y” in this context. 9.03%
The W3C HTML Validator raises this error when an element is placed inside a parent element that doesn’t allow it according to the HTML specification. Each HTML element has a defined content model that specifies which child elements are permitted. To fix this, restructure your markup so that child elements match what the parent element expects.
3. The first occurrence of ID “X” was here. 6.42%
Duplicate id attributes in an HTML document cause validation errors, accessibility problems, and unpredictable JavaScript behavior. The W3C validator flags this message to point you back to the first element that uses a given id, helping you locate where the duplication begins. To fix it, ensure every id value appears only once per page by renaming or removing the duplicates.
4. Duplicate ID “X”. 6.41%
The id attribute must be unique within an HTML document — no two elements can share the same id value. When the W3C validator reports “Duplicate ID,” it means the same id has been assigned to more than one element. To fix this, ensure every id in your document is distinct, or switch to class when you need to apply the same identifier to multiple elements.
5. The “type” attribute is unnecessary for JavaScript resources. 5.52%
Since HTML5, the default scripting language for <script> elements is JavaScript, making type="text/javascript" redundant. The W3C validator flags this as an unnecessary attribute. Simply remove the type attribute from any <script> tag that loads or contains JavaScript.
6. Attribute “X” not allowed on element “Y” at this point. 4.56%
The W3C HTML Validator reports this error when an attribute is used on an HTML element that doesn’t support it according to the HTML specification. This can happen because the attribute is misspelled, belongs to a different element, is an obsolete attribute, or is a custom attribute that isn’t using the data-* prefix. To fix it, remove the invalid attribute, correct any typos, move it to an appropriate element, or convert custom attributes to the data-* format.
7. No space between attributes. 1.93%
HTML attributes must be separated by at least one whitespace character (space, tab, or newline). When attributes are placed directly next to each other without a space between them, the W3C HTML Validator will report an error. The fix is straightforward: ensure there is a space between each attribute in every HTML element.
8. An element with the attribute “tabindex” must not appear as a descendant of the “a” element. 1.47%
An element with a tabindex attribute must not appear as a descendant of an <a> (anchor) element. This creates conflicting focus targets within an interactive element, confusing keyboard navigation and assistive technologies. To fix this, remove the tabindex attribute from any descendant elements inside the <a> element, or restructure your markup so that interactive or focusable elements are not nested inside links.
9. Attribute “X” is not serializable as XML 1.0. 1.47%
Attribute names containing certain characters — such as curly braces, template syntax markers, or control characters — cannot be represented in XML 1.0 and will trigger this validation error. This commonly happens when template placeholders (e.g., {{variable}}) or special characters are accidentally left in the rendered HTML output. To fix it, ensure all dynamic expressions are properly resolved before the HTML is served, and that attribute names only contain valid characters.
10. Section lacks heading. Consider using “h2”-“h6” elements to add identifying headings to all sections. 1.43%
The W3C HTML Validator warns when a <section> element does not contain a heading (<h2>–<h6>). The <section> element is intended to represent a thematic grouping of content that typically has its own heading. To fix this, either add a heading element inside each <section>, or consider using a different element like <div> if the content doesn’t represent a distinct, named section.
Ready to validate your sites?
Start your trial today.