Skip to main content

Los 10 errores de HTML más comunes en España

Estos son los principales problemas de HTML encontrados
en los sitios web más importantes de los principales sectores de España.

Última actualización: domingo, 15 de marzo de 2026

1. Atributo "X" no permitido en el elemento "Y" en este punto. 48.83%

Se ha encontrado un atributo no válido en un elemento. Compruebe la etiqueta afectada para asegurarse de que los atributos están bien formados, y si lo están puede considerar el uso de atributos de datos personalizados.

2. ID “X” duplicado. 11.98%

El atributo id se utiliza para identificar un único elemento dentro de un documento, y se requiere que sea único. Compruebe si hay ID repetidos en el documento.

3. El elemento "X" no puede ser hijo del elemento "Y" en este contexto. 8.09%

El elemento X no está permitido como elemento hijo de Y. Por ejemplo, un elemento <ul> no puede tener un elemento hijo <div>.

4. Etiqueta final "X" extraviada. 7.21%

Se ha encontrado una etiqueta final para X que no corresponde a una etiqueta abierta anterior. Esto suele ocurrir cuando se cierra dos veces la misma etiqueta.

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

When an img element’s srcset attribute contains image candidates with width descriptors (e.g., 400w, 800w), the sizes attribute must also be present. Without sizes, the browser has no way to determine how large the image will appear in the layout, making it impossible to choose the correct source from the candidate list. To fix this, add a sizes attribute that describes the image’s expected display width at various viewport sizes.

6. The “aria-label” attribute must not be specified on any “span” element unless the element has a “role” value other than “caption”, “code”, “deletion”, “emphasis”, “generic”, “insertion”, “paragraph”, “presentation”, “strong”, “subscript”, or “superscript”. 4.81%

A span element has an implicit ARIA role of generic, and the aria-label attribute is not allowed on elements with that role.

7. Un elemento <img> debe tener un atributo "alt", salvo en determinadas condiciones. Para más detalles, consulte la guía para proporcionar alternativas de texto a las imágenes. 4.45%

Las etiquetas <img>, utilizadas para incluir imágenes en un documento, requieren un atributo alt para describir el contenido de la imagen. Esto es esencial para los usuarios que no pueden ver la imagen (como los usuarios de lectores de pantalla), o como texto alternativo cuando la imagen no puede mostrarse.

8. Duplicate attribute “X”. 3.86%

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.

9. A “link” element with an “as” attribute must have a “rel” attribute that contains the value “preload” or the value “modulepreload”. 2.49%

The as attribute on a <link> element tells the browser what type of resource is being fetched, but it only makes sense in the context of preloading. If your <link> element uses the as attribute, its rel attribute must be set to "preload" or "modulepreload". To fix this, either add the correct rel value or remove the as attribute if you’re not preloading a resource.

10. Al elemento "X" le falta el atributo requerido "Y". 2.47%

El elemento X requiere un atributo Y, pero no está presente. Comprueba ese elemento y añade el atributo requerido, como en <X Y="value">.

Cambie a inglés o portugués
🌍 Trusted by teams worldwide

Validate at scale.
Ship accessible websites, faster.

Automated HTML & accessibility validation for large sites. Check thousands of pages against WCAG guidelines and W3C standards in minutes, not days.

Scheduled Reports
API Access
Open Source Standards
$7 / 7 days

Pro Trial

Full Pro access. Cancel anytime.

Start Pro Trial →

Join teams across 40+ countries