Los 10 errores de HTML más comunes en Portugal
Estos son los principales errores de HTML encontrados en los sitios más importantes de Portugal.
La lista de sitios web es seleccionada por Ruben Ferreira Duarte, instructor de A11Y y editor del blog DXD
Última actualización: lunes, 1 de junio de 2026
1. Atributo "X" no permitido en el elemento "Y" en este punto. 37.31%
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. 27.07%
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. 12.72%
El elemento X no está permitido como elemento hijo de Y. Por ejemplo, un elemento <ul> no puede tener un elemento hijo <div>.
4. 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. 6.13%
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.
5. Valor incorrecto "" para el atributo `target` en el elemento `<a>`: El nombre del contexto de navegación debe tener al menos un carácter. 5.01%
El atributo target de los elementos <a> no puede estar vacío.
6. Element “img” is missing one or more of the following attributes: “src”, “srcset”. 3.66%
Every <img> element must include at least a src or a srcset attribute to be valid HTML.
7. Duplicate attribute “X”. 2.72%
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.
8. Bad value X for attribute “src” on element “img”: Illegal character in path segment. Space is not allowed. 2.63%
Spaces in the src attribute of an img element are not valid URL characters and must be encoded as %20 or replaced with hyphens/underscores.
9. 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”. 1.40%
A span element has an implicit ARIA role of generic, and the aria-label attribute is not allowed on elements with that role.
10. Bad value “tel: X” for attribute “href” on element “a”: Illegal character in scheme data. 1.35%
The href attribute on an <a> element contains an illegal character in the URI scheme data. This commonly occurs with tel: links when a space is placed after the colon, but it applies to any URI scheme (mailto:, tel:, http:, etc.) with invalid characters. Remove the space or illegal character immediately following the colon to fix the issue.
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.
Pro Trial
Full Pro access. Cancel anytime.
Start Pro Trial →Join teams across 40+ countries