Top 10 HTML Issues in Spain
These are the main HTML issues found in the most prominent Spain websites for the main sectors.
Last update: Sunday, December 15, 2024
1. Trailing slash on void elements has no effect and interacts badly with unquoted attribute values. 36.45%
Void elements, like area
, base
, br
, col
, embed
, hr
, img
, input
, link
, meta
, source
, track
, and wbr
are self-closing and don’t need a trailing slash /
, which should be avoided as that can interfere with unquoted attribute values.
2. Attribute “X” not allowed on element “Y” at this point. 22.37%
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. Attribute “X” is not serializable as XML 1.0. 9.14%
An attribute could not be parsed from the HTML input, probably due to a typo. Check this guide for a related HTML issue.
4. Duplicate ID “X”. 7.12%
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.
5. The first occurrence of ID “X” was here. 7.07%
Element IDs in an HTML document must be unique. The HTML validator is indicating the first occurrence of an ID that is repeated. Check the details for that issue to see web pages affected, and the elements within them, to fix that ID repetition.
6. The “type” attribute is unnecessary for JavaScript resources. 5.82%
The default type
for <script>
tags is JavaScript
, so you don’t need to include the type for JS resources.
7. Stray end tag “X”. 4.01%
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.
8. Element “X” not allowed as child of element “Y” in this context. 3.63%
The element X is not allowed as a child element of Y. For example, a <ul>
element cannot have a <div>
child element.
9. Section lacks heading. Consider using “h2”-“h6” elements to add identifying headings to all sections. 2.46%
The <section>
element can be used to define sections of a document, like chapters, tabbed content, etc. Consider using a heading element (any of <h2>
to <h6>
) to present each section.
10. When the “srcset” attribute has any image candidate string with a width descriptor, the “sizes” attribute must also be present. 1.92%
Check the HTMLImageElement.srcset guide to learn about the correct usage of the srcset
and sizes
attributes.
Ready to validate your sites?
Start your trial today.