Skip to main content

Top 10 HTML Warnings

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

Last update: Wednesday, March 18, 2026

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

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. The first occurrence of ID “X” was here. 7.98%

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.

3. The “type” attribute is unnecessary for JavaScript resources. 7.51%

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.

4. Section lacks heading. Consider using “h2”-“h6” elements to add identifying headings to all sections. 1.89%

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.

5. Attribute “X” is not serializable as XML 1.0. 1.81%

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.

6. The document is not mappable to XML 1.0 due to two consecutive hyphens in a comment. 1.36%

` delimiters of your comments.

7. The “type” attribute for the “style” element is not needed and should be omitted. 1.11%

The type attribute on the <style> element is unnecessary in HTML5 and should be removed. Since CSS is the default and only supported styling language for HTML, specifying type="text/css" is redundant. Simply remove the type attribute from your <style> tags to resolve this warning.

8. The “navigation” role is unnecessary for element “nav”. 0.82%

The nav element already has an implicit ARIA role of navigation, so adding role="navigation" to it is redundant. The W3C validator flags this as unnecessary because the semantic meaning is already built into the element. To fix this warning, simply remove the role="navigation" attribute from any nav element.

9. Article lacks heading. Consider using “h2”-“h6” elements to add identifying headings to all articles. 0.64%

The <article> element represents a self-contained composition, but when it lacks a heading (<h2><h6>), assistive technologies and users have no way to quickly identify its content. Fix this by adding a descriptive heading element inside each <article> to give it a clear, accessible label.

10. Empty heading. 0.24%

Heading elements (<h1> through <h6>) must contain text or other meaningful content. An empty heading — such as <h1></h1> or a heading with only whitespace — provides no information to users or assistive technologies and triggers a “Empty heading” warning in the W3C HTML Validator. To fix this, ensure every heading element contains descriptive text content, or remove the empty heading entirely if it’s not needed.

Switch to Spanish or Portuguese
🌍 Trusted by teams worldwide

Validate at scale.
Ship accessible websites, faster.

Automated HTML & accessibility validation for large sites. Check thousands of pages against WCAG guidelines and W3C standards in minutes, not days.

Scheduled Reports
API Access
Open Source Standards
$7 / 7 days

Pro Trial

Full Pro access. Cancel anytime.

Start Pro Trial →

Join teams across 40+ countries