Top 10 HTML Errors 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. Attribute “X” not allowed on element “Y” at this point. 30.21%
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.
2. Duplicate ID “X”. 24.57%
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.
3. Element “X” not allowed as child of element “Y” in this context. 13.42%
The element X is not allowed as a child element of Y. For example, a <ul>
element cannot have a <div>
child element.
4. An “img” element must have an “alt” attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images. 8.58%
<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.
5. CSS: “X”: Property “X” doesn't exist. 6.85%
The specified CSS property is not valid.
6. Bad value “” for attribute “target” on element “a”: Browsing context name must be at least one character long. 6.12%
The target
attribute on <a>
elements can’t be blank.
7. Element “img” is missing required attribute “src”. 3.22%
<img>
tags used to display images require the attribute src
to indicate the source of the image, for example <img src="/img/photo.jpg" />
.
8. Element “div” not allowed as child of element “ul” in this context. 3.09%
A <div>
tag has been found as a direct child of an <ul>
tag, and this is not allowed. For example, <ul><div><li>item</li></div></ul>
is not valid, but <ul><li><div>item</div></li></ul>
is valid as the direct child of <ul>
is <li>
.
9. Stray end tag “X”. 2.07%
An end tag for X has been found that does not correspond to a previous open tag. This usually happens when you close the same tag twice.
10. Unclosed element “X”. 1.89%
An open tag has not been properly closed.
Ready to validate your sites?
Start your trial today.