Validate your web pages

There are rules defining how HTML is used – if your site has poorly formed code, it may hinder the attempts of search engines to read and understand it.

Unlike a Word document or PDF, there’s no concept of a fixed or accepted version of a webpage, which will change its appearance depending on operating system, browser type, browser version, installed fonts and user preferences. Good code can help bridge these differences and make a page look broadly the same all the way from Chrome on a Netbook to Safari on a Mac.

Search engine spiders and browsers are surprisingly resilient at reading bad code and making it work, but any errors become visible when comparing the same website in different browsers. The World Wide Web Consortium (W3C) is responsible for defining the standards behind HTML, and major browser developers such as Microsoft, Mozilla and Google adhere to these standards to ensure sites appear the same across browsers (and operating systems).

In the book, we discuss what validation is, how to test it, and why browser compatibility is key.