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: Saturday, November 1, 2025
1. Duplicate ID “X”. 32.77%
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.
2. Attribute “X” not allowed on element “Y” at this point. 28.83%
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. Element “X” not allowed as child of element “Y” in this context. 14.19%
The element X is not allowed as a child element of Y. For example, a <ul> element cannot have a <div> child element.
4. Bad value “” for attribute “target” on element “a”: Browsing context name must be at least one character long. 6.14%
The target attribute on <a> elements can’t be blank.
5. An “img” element must have an “alt” attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images. 5.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.
6. Duplicate attribute “X”. 2.99%
Attributes in HTML elements must be unique. For example, <a id="one" id="two"> is invalid as the attribute id is repeated.
7. Element “div” not allowed as child of element “ul” in this context. 2.88%
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>.
8. Element “img” is missing required attribute “src”. 2.78%
<img> tags used to display images require the attribute src to indicate the source of the image, for example <img src="/img/photo.jpg" />.
9. Bad value “tel: X” for attribute “href” on element “a”: Illegal character in scheme data. 2.00%
The href attribute on an <a> link contains an invalid character. If you’re trying to link to a phone URL, review the href attribute to remove unallowed characters.
10. Bad value “” for attribute “(width|height)” on element “img”: The empty string is not a valid non-negative integer. 1.96%
The attributes width and height of <img> elements expect a non-negative integer, so an empty string is not allowed. Either define the correct dimension, or remove this attribute.
Ready to validate your sites?
Start your trial today.