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, December 1, 2024

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

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

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

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

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

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. Article lacks heading. Consider using “h2”-“h6” elements to add identifying headings to all articles. 1.21%

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.

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

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

8. The “button” role is unnecessary for element “button”. 1.02%

The button role is used to make an element appear as a button control to a screen reader and can be applied to otherwise non-interactive elements like <div>. If you’re already using a <button> element, then it’s redundant to apply it the role button, as that’s implicit.

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

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.

10. The “charset” attribute on the “script” element is obsolete. 0.69%

A <script> element has been found that is using the now obsolete charset attribute. You can safely remove this attribute.

Switch to Spanish or Portuguese

Ready to validate your sites?
Start your trial today.