Spunk Autos

Websites and web tools

HTML validators: what their results predict about your site

An HTML validator checks markup against the HTML standard and returns a list of errors and warnings. The useful question is which of those messages predict a real problem for a customer, a search engine or a screen reader user. This page sorts them so a small business site owner can fix what matters first.

Errors that predict real trouble

Validator messageLikely effect
Duplicate id attributeLabels, links and scripts may target the wrong element
Unclosed or misnested elementBrowsers repair it differently, so layout can break
Missing alt on an imageScreen readers announce nothing useful
Form control without a labelUsers of assistive tech cannot tell what to type
Stray end tag after bodyUsually harmless, but a sign of broken templates
Bad charset or missing doctypeOdd characters or quirks-mode rendering

Messages that rarely matter

  • Warnings about a trailing slash on void elements such as img.
  • Notes that a type attribute on a script is unnecessary.
  • Unknown attributes that a framework adds and the browser ignores.

These do not usually change what a visitor sees. Fix them when you are in the file anyway, not as a priority.

What a clean result does not predict

Valid HTML is not the same as an accessible, fast or well-ranked page. A validator will not tell you that link text says only click here, that colours lack contrast, that an image is 4 MB, or that the page title is the same on every service page. Pair it with an accessibility checker and a speed test.

Triage a long error list

  1. Validate one page from each template, not every page; errors repeat across a template.
  2. Group errors by message and count them.
  3. Fix template-level errors first, since one fix clears many pages.
  4. Re-run the validator after each fix; one unclosed tag can cause dozens of follow-on errors.
  5. Add a validator to your build or CI so new errors are caught before release.

Should you chase zero errors?

Zero is a good target for hand-written templates you control. Third-party widgets, such as a booking embed or a map, may produce errors you cannot change. Note those, check that they do not break the page, and move on.

Where validation is going

The trend is toward running checks automatically inside editors and build pipelines rather than pasting a URL into a web form. The checks themselves follow the living HTML standard, so a result can change over time as the standard does. Re-validate templates after major updates rather than trusting a result from years ago.