Skip to main content

Top 10 HTML Warnings

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

Last update: Monday, April 21, 2025

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

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

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. The “type” attribute is unnecessary for JavaScript resources. 11.87%

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

4. Attribute “X” is not serializable as XML 1.0. 2.27%

An attribute could not be parsed from the HTML input, probably due to a typo. Check this guide for a related HTML issue.

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

The <section> element can be used to define sections of a document, like chapters, tabbed content, etc. Consider using a heading element (any of <h2> to <h6>) to present each section.

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

Malformed comment syntax has been found, check out the affected comment.

HTML comments are helpful to leave notes about the code right next to it. To create a comment, it must start with <!-- and end with -->.

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

The HTML <style> element contains style information for a document, or part of a document, defined in CSS. This element does not need the type attribute anymore, so it should be omitted.

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

The navigation landmark role is used to identify major groups of links used for navigating through a website or page content. It can be added to an element that contains navigation links by using role="navigation", but instead it’s preferable to just use the <nav> element. In that case, it’s unnecessary to make the navigation role explicit.

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

The <article> element can be used to define complete, self-contained compositions of a document, for example blog posts. Consider using a heading element (any of <h2> to </h6>) to present each article.

10. Consider using the “h1” element as a top-level heading only (all “h1” elements are treated as top-level headings by many screen readers and other tools). 0.38%

The HTML <h1> to <h6> elements represent headings for the different sections of a document, where <h1> is the highest section and <h6> is the lowest.

Switch to Spanish or Portuguese

Ready to validate your sites?
Start your trial today.