Top 10
HTML Warnings

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

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

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

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

3. The first occurrence of ID “X” was here. 8.41%

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.

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

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

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

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.

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

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.

7. Possible misuse of “aria-label”. 1.31%

The aria-label attribute is used to define a string that labels the current element. Use it in cases where a text label is not visible on the screen. This attribute does not work consistently with all HTML elements, so the W3C validator is warning about a possible misuse.

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

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. Attribute “X” is not serializable as XML 1.0. 0.60%

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

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

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.

Ready to validate your sites?
Start your trial today.