Skip to main content

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: Thursday, May 1, 2025

1. Attribute “X” not allowed on element “Y” at this point. 29.85%

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”. 27.37%

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

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

The target attribute on <a> elements can’t be blank.

5. CSS: “X”: Property “X” doesn't exist. 4.81%

The specified CSS property is not valid.

6. An “img” element must have an “alt” attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images. 3.74%

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

7. Element “img” is missing required attribute “src”. 3.61%

<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. Bad value “” for attribute “(width|height)” on element “img”: The empty string is not a valid non-negative integer. 3.55%

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.

9. Element “div” not allowed as child of element “ul” in this context. 3.11%

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

10. The “itemprop” attribute was specified, but the element is not a property of any item. 2.59%

An itemprop attribute has been found in the document, but it cannot be associated to any item. Most probable cause is the lack of an itemscope attribute defining an item.

Switch to Spanish or Portuguese

Ready to validate your sites?
Start your trial today.