Nearly nine out of ten popular websites contain HTML that does not fully comply with official web standards. While this usually causes few problems for browsers, screen readers and other software have a harder time handling these errors. AI agents that parse websites can also run into problems as a result.
This is according to research by ValidateHTML, a project by French developer Théo Ducreux. He analyzed the 5,000 most popular domains from the Tranco ranking. Of those, 2,656 had a human-readable homepage that could be analyzed. Those pages had a total of 100,305 violations of the HTML specification.
Of the sites examined, 87.2 percent contain at least one HTML error. Only 12.8 percent have completely valid HTML. When warnings regarding best practices are also taken into account, only 2.6 percent remain completely error-free. In addition, 18,863 CSS errors were found.
Browsers correct errors
So many errors go largely unnoticed partly because modern browsers are tolerant of invalid HTML. Chrome and other browsers attempt to determine what a developer intended and correct issues while rendering a page. As a result, a website can appear normal even though the underlying HTML does not comply with the specifications.
According to Ducreux, this tolerance also allows errors to accumulate. If an error does not cause a visible problem, developers have little incentive to fix it.
The most common error involves incorrectly placed or nested HTML elements. This problem was found on over 59 percent of the sites examined. According to Ducreux, such errors often arise during the build process of front-end frameworks. So it’s not necessarily code that a developer has written incorrectly.
Accessibility issues
The consequences become more apparent when websites are processed by software other than browsers. More than a third of the sites examined failed accessibility checks, according to The Register. For example, 20.4 percent of the websites lack alternative text for images, and 41.6 percent lack ARIA labels, which make page elements recognizable to assistive technologies.
This can cause problems for screen readers, software that reads websites aloud for blind and visually impaired users. According to Ducreux, such programs are much less capable of handling faulty HTML than Chrome. As a result, a page that looks correct to a sighted user may be unclear or difficult to navigate for someone using a screen reader.
This also means that poor HTML has a compliance aspect. Starting in 2025, the European Accessibility Act will take effect in the European Union, setting accessibility requirements for various digital products and services.
AI agents also read websites
Valid HTML may also become more important as AI agents rise. Websites are increasingly being processed not only by browsers but also by AI systems, voice assistants, and translation software. These systems do not necessarily have the same extensive error-correction capabilities that browsers have developed over decades.
According to Ducreux, this is a reason not to consider web standards obsolete. Invalid HTML usually does not pose an immediate problem for visitors using a modern browser, but valid markup ensures that the meaning and structure of a page are preserved for other software as well.
ValidateHTML is an independent project by Ducreux. For his research, he used a crawler he developed himself, combined with various open-source HTML and CSS parsers. Of the original 5,000 domains, 2,344 could not be included, partly because they do not offer a standard homepage or block automated requests.