Valid HTML
We should always write valid HTML code. Valid HTML code is a code that follows the official HTML rules and has no bugs. Valid HTML is preferred by Google since it makes websites more likely to work on browsers we haven't tested. It looks more professional, and it's better for accessibility, making it easier for screen readers to read websites for blind users, for instance. There is an official tool for checking whether we have valid HTML code, which is called W3 markup validator (https://validator.w3.org/). We are going to use it to test our website. To do that, we just copy the entire code using command or Ctrl + A, and then copy it. On the website, validator.w3, we will use the Validate by Direct Input option and paste all our ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access