Top 10 HTML Warnings in Portugal
Web developers worldwide have found 476 million HTML issues on 13 million checked web pages.
Here are the most common issues detected by Rocket Validator on Portugal websites.
Last update: Tuesday, September 22, 2026
1. Attribute “aria-hidden” is unnecessary for elements that have attribute “hidden”. 41.93%
The aria-hidden attribute is redundant when the hidden attribute is already present on an element.
2. Trailing slash on void elements has no effect and interacts badly with unquoted attribute values. 39.81%
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.
3. The “type” attribute is unnecessary for JavaScript resources. 6.94%
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. The first occurrence of ID “X” was here. 4.91%
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.
5. The document is not mappable to XML 1.0 due to two consecutive hyphens in a comment. 2.70%
HTML comments containing two consecutive hyphens (--) inside the comment body are not valid according to XML 1.0 rules, which the HTML serialization rules also enforce. To fix this, remove or replace any double hyphens (--) that appear between the opening and closing delimiters of your comments.
6. 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.
7. Attribute “X” is not serializable as XML 1.0. 0.87%
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.
8. The “type” attribute for the “style” element is not needed and should be omitted. 0.64%
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.
9. The “X” attribute on the “Y” element is obsolete. Use CSS instead. 0.45%
The W3C HTML Validator reports this error when an HTML element uses a presentational attribute that was deprecated in HTML5. These legacy attributes — such as align, bgcolor, border, cellpadding, cellspacing, width, height, valign, and others — controlled visual styling directly in HTML but have been replaced by CSS. To fix this, remove the obsolete attribute from the element and apply the equivalent CSS property instead.
10. Article lacks heading. Consider using “h2”-“h6” elements to add identifying headings to all articles. 0.33%
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.
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.
1K Weekly
1,000 monthly checks. Cancel anytime.
Get 1K Weekly →Join teams across 40+ countries