Skip to main content

Top 10 HTML Warnings in Portugal

These are the main HTML issues found in the most prominent Portugal websites.
The website list is curated by Ruben Ferreira Duarte, A11Y trainer and editor of the DXD blog

Last update: Sunday, March 1, 2026

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

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

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

4. The “type” attribute is unnecessary for JavaScript resources. 7.95%

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.

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

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.

6. The “link” role is unnecessary for element “a” with attribute “href”. 1.15%

The link role is unnecessary on an <a> element that already has an href attribute, because the browser automatically assigns the link role to such elements. To fix this warning, simply remove the role="link" attribute from your anchor elements.

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

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.

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

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 “button” role is unnecessary for element “button”. 0.38%

The role="button" attribute is unnecessary when applied to a <button> element because the button already has an implicit ARIA role of button. To fix this warning, simply remove the role="button" attribute from any <button> elements in your markup.

10. The “navigation” role is unnecessary for element “nav”. 0.37%

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.

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