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: Monday, February 2, 2026

1. Duplicate ID “X”. 34.19%

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

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

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

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

6. Duplicate attribute “X”. 3.42%

Each HTML element must have unique attribute names — no attribute can appear more than once on the same element. When the W3C validator reports “Duplicate attribute,” it means an attribute like id, class, or any other has been specified two or more times on a single element. To fix this, merge the duplicate attributes into a single declaration or remove the unintended repetition.

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

A <div> element has been placed as a direct child of a <ul> element, which violates the HTML specification. The <ul> element only permits <li>, <script>, and <template> elements as direct children. To fix this, either move the <div> inside an <li> element, or restructure your markup so the <ul> contains only valid children.

8. Bad value “tel: X” for attribute “href” on element “a”: Illegal character in scheme data. 2.08%

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.

9. Stray end tag “X”. 1.49%

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. Bad value “X” for attribute “src” on element “img”: Illegal character in path segment: space is not allowed. 1.40%

Spaces in URLs used in HTML attributes like src are not valid according to the URL specification. When the W3C validator encounters a space in an img element’s src attribute, it reports an illegal character error. To fix this, replace each space with %20 (percent-encoding) or restructure the URL to avoid spaces entirely.

Switch to Spanish or Portuguese

Ready to validate your sites?
Start your trial today.