仅 2.6% 的高流量网站拥有完全有效的 HTML。
Only 2.6% of the most visited websites have fully valid HTML

原始链接: https://validatehtml.com/html-error-statistics

为分析网络标准合规性,作者于2026年8月对Tranco排名前5,000的域名进行了审计。他们利用自有的公共API(该API也是其网站html-validate和csstree-validator工具的底层技术支持)对各主页进行了扫描,旨在识别实际的规范违规行为,而非主观的“最佳实践”警告。 该研究严格区分了客观的HTML/CSS错误与风格偏好,并指出许多同类报告因混淆两者而夸大了统计数据。在5,000个域名中,有2,345个因基础设施相关问题(如无法访问的URL、访问限制或文件过大)被排除在外。 为了强调问责制,作者将这些严苛的验证测试应用于他们自己的网站。在初步发现并修复了四个小问题后,他们确认目前网站的每个页面均保持零错误且零警告。研究人员通过“吃自己的狗粮”(使用自研工具),提出严格的自我验证是进行可信技术研究的必要前提,也是区分真实测量与单纯营销的关键。

validatehtml.com 的一份最新报告显示,只有 2.6% 的顶级网站拥有完全合规的 HTML。Hacker News 上的一场讨论突显了人们对此发现的不同看法: * **实用主义观点:** 许多人认为 HTML 对语法错误的极高容忍度是网络的核心优势,即使开发者犯错,也能确保内容在各种浏览器和设备上保持可访问性。一些用户质疑“完全合规”代码的相关性,认为业界大体上并不将其视为一个问题。 * **批评性观点:** 另一些人则认为,无效的 HTML 反映了开发者的懈怠,尤其是在现代工具和人工智能可以辅助编码的情况下。 * **无障碍差距:** 讨论的很大一部分集中在无障碍访问上。评论者指出,无障碍性往往事后才被考虑,因为开发者很少使用屏幕阅读器进行测试,或者缺乏如何实现包容性设计的理解。 总体而言,社区对于 HTML 验证在如今浏览器灵活性优先于严格合规性的时代,究竟是一个有意义的指标还是一个过时的标准,存在分歧。
相关文章

原文

We 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. Driving the real API rather than the engines means every false-positive filter we ship applied here too, so these counts are what a user of the tool actually sees.

Severity is not a style choice. We count as an error only what violates the written HTML standard. Opinions that are still valid HTML, such as an inline style or a missing type on a button, are counted separately as best practiceand are labelled as such in the tables above. Many published “error” statistics conflate the two, which roughly triples the headline.

Messages are grouped into families by masking their variable parts, so Unknown property `colr` and Unknown property `bakground` count as one problem. The exact wording shown in each row is the most frequent variant.

2,345 of the 5,000 domains produced no measurement and are excluded from every percentage on this page. A large share of the top of the list is infrastructure: CDN and DNS hostnames that were never meant to serve a page. The reasons:

  • 1,479Could not reach the URL. Check that it is valid and accessib
  • 433Failed to fetch: … Forbidden
  • 248Response too large (max NKB)
  • 81Failed to fetch: … Not Found
  • 21No HTML content provided

And we ran it on ourselves. Every page of this site, all 102 of them including the one you are reading, validates at zero errors and zero warnings against the engine above. Writing this study is what made us check; it found four problems we then fixed. Publishing a number you have not applied to your own site is not research, it is marketing.

联系我们 contact @ memedata.com