Validating Your HTML5 Web Page - dummies

By Andy Harris

No matter how careful you are, sometimes you make silly mistakes when coding your HTML5 web pages. A tool something like a spell-checker for code would be great. Lo and behold, there is such a code-checking tool.

The W3C Markup Validation Service, brought to you by the same folks who came up with the standards in the first place, allows you to check any page to see if it complies with the standards you declared in the doctype.

The validator in action looks like this:


The W3 validator checks XHTML and HTML5 code. As HTML5 becomes more common, watch for other tools to be available directly in your browser and editor to simplify validating HTML5 code.

The validator is great, but it’s not perfect. It can’t find every mistake, and of course it works only when you’re connected to the Internet. More troubling, the error messages it gives you are sometimes very mysterious and not very helpful.