Skip to content
HN On Hacker News ↗

HTML & CSS Error Statistics: We Validated the Top 5,000 Websites

▲ 49 points 64 comments by theo_dcrx 2w ago HN discussion ↗

Pangram verdict · v3.3

We believe that this text is a mix of AI and human-written content.

69 %

AI likelihood · overall

Mixed
39% human-written 61% AI-generated
SEGMENTS · HUMAN 1 of 2
SEGMENTS · AI 1 of 2
WORD COUNT 883
PEAK AI % 100% · §1
Analyzed
Aug 12
backend: pangram/v3.3
Segments scanned
2 windows
avg 442 words each
Distribution
39 / 61%
human / AI fraction
Verdict
Mixed
Pangram v3.3

Article text · 883 words · 2 segments analyzed

Human AI-generated
§1 AI · 100%

Original researchBetween the Tranco top 5,000 domains, 2,655 served a home page we could read. We ran the same validators this site offers for free over every one of them and counted what came back: 100,399 HTML spec violations and 17,599 CSS errors, in 220 distinct message families. This is the full ranking.Published August 11, 2026 · Free to cite with a link.Key findings90.5%of sites have at least one HTML error2,402 of 2,655 sites. Not warnings, but violations of the written standard.2.6%are completely cleanOnly 69 sites returned zero errors and zero best-practice warnings.12errors on the median siteThe mean is 37.8 and the worst site had 2,209. A small tail carries most of the damage.65.1%of sites have a CSS errorMeasured on 2,471 sites, across every stylesheet the page links.1CSS errors on the median siteCSS fails differently: most sites have one bad declaration, not hundreds. The mean is 7.1.220distinct message families187 of them are spec violations. The whole web's markup fails in a countable number of ways.What the numbers sayValid HTML is the exception, not the rule. Nine sites in ten among the most visited on the web violate the standard on their home page, and 2.6% come back completely clean. Browsers are so good at error recovery that nothing forces anyone to fix this, which is exactly why it accumulates.The distribution is brutally skewed. The median site has 12 errors, the mean 37.8, and the worst 2,209. Most sites have a handful of mistakes repeated a few times; a minority have one template bug repeated across every component on the page. If you are auditing a site, the count matters far less than the number of distinct rules broken. That is why our scores are computed per rule, not per occurrence.The top failures are structural, not typos. The single most common finding is <X> element is not permitted as content under <X> (59.5% of sites). Nobody writes that by hand. It is what happens when components are composed by a framework that does not know which element it is being dropped into. It is a nesting problem created at build time, not in an editor.Accessibility failures are near-universal. The findings that the Accessibility Checker keeps ( heading levels, unlabelled inputs, links with no text ) each appear on more than a third of sites. With the European Accessibility Act applicable since June 2025, that is a compliance surface, not a style preference.CSS breaks in one place, not everywhere. 65.1% of sites have a CSS error but the median count is 1, and the most common one by far is Invalid value for `X` property. A stylesheet with a broken declaration still renders; the browser drops the line and moves on. That silence is the reason these survive in production for years.The 25 most common HTML findingsRanked by how many distinct sites emit the message, not by raw occurrences.

§2 Human · 20%

One message repeated 4,000 times on a single site is still one site.#MessageSitesShare1<style> element is not permitted as content under <div>spec violation·element-permitted-content·how to fix1,58159.5%2"type" attribute is unnecessary for javascript resourcesbest practice·script-type·how to fix1,45254.7%3<button> is missing recommended "type" attributebest practice·no-implicit-button-type·how to fix1,31649.6%4Prefer to use the native <button> elementbest practice·prefer-native-element·how to fix1,10741.7%5<img> is missing required "src" attributespec violation·element-required-attributes1,09341.2%6Anchor link must have a text describing its purposebest practice·wcag/h30·how to fix1,00137.7%7Landmarks must have a non-empty and unique accessible name (aria-label or aria-labelledby)best practice·unique-landmark·how to fix91834.6%8Initial heading level must be <h1> but got <h2>best practice·heading-level·how to fix82331.0%9<input> element does not have a <label>best practice·input-missing-label·how to fix79730.0%10Attribute "target" has invalid value ""spec violation·attribute-allowed-values·how to fix77829.3%11Redundant role "link" on <a>best practice·no-redundant-role·how to fix74828.2%12Heading level can only increase by one, expected <h3> but got <h4>best practice·heading-level·how to fix66825.2%13Duplicate ID "porb"spec violation·no-dup-id·how to fix62123.4%14<button> must have accessible textbest practice·text-content·how to fix58922.2%15Attribute "name" is deprecated on <a> elementspec violation·no-deprecated-attr·how to fix51219.3%16<img> is missing required "alt" attributespec violation·wcag/h37·how to fix50719.1%17Class "][" duplicatedbest practice·no-dup-class44716.8%18Element references missing id "Browse"spec violation·no-missing-references·how to fix43216.3%19"aria-label" cannot be used on this elementspec violation·aria-label-misuse·how to fix42816.1%20Prefer to use <button> instead of <input type="submit"> when adding buttonsbest practice·prefer-button·how to fix40915.4%21<form> element must have a submit buttonbest practice·wcag/h32·how to fix35713.4%22<a> element is not permitted as a descendant of <a>spec violation·element-permitted-content·how to fix33912.8%23title text cannot be longer than 70 charactersbest practice·long-title33312.5%24Stray end tag '</p>'spec violation·close-order·how to fix26810.1%25Unclosed element '<div>'spec violation·close-order·how to fix2298.6%The 15 most common CSS findingsEvery stylesheet a page links is validated separately, so a line number always refers to its own file.#MessageSitesShare1Invalid value for `transition-delay` propertyspec violation·SyntaxMatchError·how to fix1,34150.5%2Unknown property `font-smoothing`spec violation·SyntaxReferenceError·how to fix43616.4%3Unknown at-rule `@if`spec violation·SyntaxReferenceError·how to fix1234.6%4Unexpected end of inputspec violation·SyntaxError·how to fix863.2%5Invalid value for `src` descriptorspec violation·SyntaxMatchError·how to fix712.7%6Unexpected token Semicolonspec violation·SyntaxError·how to fix622.3%7Unknown at-rule descriptor `font-named-instance`spec violation·SyntaxReferenceError·how to fix361.4%8Invalid value for `@media` preludespec violation·SyntaxMatchError·how to fix301.1%9Invalid empty selectorspec violation·SyntaxError220.8%10Unexpected token Ident("padding-top")spec violation·SyntaxError·how to fix130.5%11Unexpected token Delim('!')spec violation·SyntaxError·how to fix80.3%12Unexpected token Delim('*')spec violation·SyntaxError·how to fix70.3%13Invalid dangling combinator in selectorspec violation·SyntaxError70.3%14Unexpected token AtKeyword("media")spec violation·SyntaxError·how to fix50.2%15Pseudo-elements like '::before' or '::after' can't be followed by selectors like 'Delim('.')'spec violation·SyntaxError40.2%How we measured itWe took the Tranco top 5,000 from the Tranco list , a research ranking that averages several popularity lists to resist manipulation, and requested the home page of each domain over HTTPS in August 2026.Each page went through the same public endpoints this site runs for its users: HTML through html-validate on its standard preset, CSS through csstree-validator with lightningcss adjudicating modern syntax.