Skip to main content

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: domingo, 1 de marzo de 2026

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

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

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

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

4. Valor incorrecto "" para el atributo `target` en el elemento `<a>`: El nombre del contexto de navegación debe tener al menos un carácter. 6.65%

El atributo target de los elementos <a> no puede estar vacío.

5. 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. 5.60%

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.

6. Duplicate attribute “X”. 3.17%

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.

7. Bad value “tel: X” for attribute “href” on element “a”: Illegal character in scheme data. 1.96%

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.

8. Element “div” not allowed as child of element “ul” in this context. 1.95%

A <div> element has been placed as a direct child of a <ul> element, which violates the HTML specification. The <ul> element only permits <li>, <script>, and <template> elements as direct children. To fix this, either move the <div> inside an <li> element, or restructure your markup so the <ul> contains only valid children.

9. Bad value “X” for attribute “src” on element “img”: Illegal character in path segment: space is not allowed. 1.90%

Spaces in URLs used in HTML attributes like src are not valid according to the URL specification. When the W3C validator encounters a space in an img element’s src attribute, it reports an illegal character error. To fix this, replace each space with %20 (percent-encoding) or restructure the URL to avoid spaces entirely.

10. Etiqueta final "X" extraviada. 1.45%

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.

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