Top 10 HTML Warnings 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. 56.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” is not serializable as XML 1.0. 14.16%
An attribute could not be parsed from the HTML input, probably due to a typo. Check this guide for a related HTML issue.
3. The first occurrence of ID “X” was here. 10.94%
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.
4. The “type” attribute is unnecessary for JavaScript resources. 9.02%
The default type
for <script>
tags is JavaScript
, so you don’t need to include the type for JS resources.
5. Section lacks heading. Consider using “h2”-“h6” elements to add identifying headings to all sections. 3.82%
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.
6. Possible misuse of “aria-label”. 2.45%
The aria-label
attribute is used to define a string that labels the current element. Use it in cases where a text label is not visible on the screen. This attribute does not work consistently with all HTML elements, so the W3C validator is warning about a possible misuse.
7. The “button” role is unnecessary for element “button”. 1.25%
The button
role is used to make an element appear as a button control to a screen reader and can be applied to otherwise non-interactive elements like <div>
. If you’re already using a <button>
element, then it’s redundant to apply it the role button
, as that’s implicit.
8. The “type” attribute for the “style” element is not needed and should be omitted. 0.85%
The HTML <style>
element contains style information for a document, or part of a document, defined in CSS. This element does not need the type
attribute anymore, so it should be omitted.
9. The “charset” attribute on the “script” element is obsolete. 0.67%
A <script>
element has been found that is using the now obsolete charset
attribute. You can safely remove this attribute.
10. The “listitem” role is unnecessary for element “li”. 0.40%
A <li>
element is used to define an item of a list, so adding the listitem
role to it is redundant.
Ready to validate your sites?
Start your trial today.