Skip to main content

Top 10 HTML Errors in Spain

These are the main HTML issues found in the most prominent Spain websites for the main sectors.

Last update: Tuesday, April 15, 2025

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

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

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. Stray end tag “X”. 8.80%

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.

4. Element “X” not allowed as child of element “Y” in this context. 8.29%

The element X is not allowed as a child element of Y. For example, a <ul> element cannot have a <div> child element.

5. When the “srcset” attribute has any image candidate string with a width descriptor, the “sizes” attribute must also be present. 4.72%

Check the HTMLImageElement.srcset guide to learn about the correct usage of the srcset and sizes attributes.

6. CSS: “X”: Parse Error. 4.11%

A CSS definition for an X property could not be understood by the parser. Check it to ensure that it’s well formed and that it contains an appropriate value.

7. Element X is missing required attribute Y. 3.52%

The element X requires an attribute Y, but it’s not present. Check that element and add the required attribute, like in <X Y="value">.

8. Element “img” is missing required attribute “src”. 3.29%

<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. An “img” element must have an “alt” attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images. 2.75%

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

10. CSS: Unrecognized at-rule “@container”. 1.91%

The @container at-rule is a recent addition to CSS which isn’t officially a standard rule yet, although widely supported by major browsers.

Switch to Spanish or Portuguese

Ready to validate your sites?
Start your trial today.