Top 10 HTML Issues 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. 39.99%
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. Attribute “X” not allowed on element “Y” at this point. 12.17%
An invalid attribute has been found on an element. Check the affected tag to ensure attributes are well-formed, and if they are you can consider using custom data attributes.
3. The first occurrence of ID “X” was here. 9.90%
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. Duplicate ID “X”. 9.90%
The id
attribute is used to identify a single element within a document, and is required to be unique. Check the document for repeated IDs.
5. The “type” attribute is unnecessary for JavaScript resources. 7.09%
The default type
for <script>
tags is JavaScript
, so you don’t need to include the type for JS resources.
6. Attribute “X” is not serializable as XML 1.0. 6.87%
An attribute could not be parsed from the HTML input, probably due to a typo. Check this guide for a related HTML issue.
7. Element “X” not allowed as child of element “Y” in this context. 5.40%
The element X is not allowed as a child element of Y. For example, a <ul>
element cannot have a <div>
child element.
8. An “img” element must have an “alt” attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images. 3.46%
<img>
tags, used to include images on a document, require an alt
attribute to describe the contents of the image. This is essential for users that cannot see the image (like screen reader users), or as an alternate text when the image cannot be displayed.
9. CSS: “X”: Property “X” doesn't exist. 2.76%
The specified CSS property is not valid.
10. Bad value “” for attribute “target” on element “a”: Browsing context name must be at least one character long. 2.46%
The target
attribute on <a>
elements can’t be blank.
Ready to validate your sites?
Start your trial today.