HTML validation allows authors to check their HTML syntax. Valid HTML is less likely to cause problems with different browsers and more likely to survive the next browser release. There are many reasons to validate your HTML, but here we have chosen to focus on just 4 reasons that show why visually checking your Web pages in browsers is not enough.
When Netscape 1.1 was released, many authors were delighted to find that they could create animated titles and backgrounds by including multiple <TITLE> and <BODY> tags. Validators flagged these as errors since only one TITLE and BODY is permitted in HTML.
Netscape 1.2 fixed the bug in Netscape 1.1, and multiple <TITLE> and <BODY> tags were ignored. The result on some invalid pages varied from an incomplete or incoherent title to unreadable text.
Netscape 2.0 provided the most stark display of the importance of validation. Prior to Netscape 2.0, the Web's most popular browser quietly corrected an author's missing quotation mark, as in <A HREF="oops.html>Oops</A>. Netscape 2.0 began requiring that closing quotation mark, and at the same time parts of many Web pages began disappearing. Valid HTML survived unscathed.
Netscape 3.0 began looking too hard for entities in attribute values. The result was that unescaped ampersands in attribute values could result in Netscape using the wrong attribute value. For example, the invalid HTML <A HREF="foo.pl?chapter=1§ion=2"> worked fine in versions of Netscape prior to 3.0. But Netscape 3.0 would try to fetch "foo.pl?chapter=1§ion=2" instead of the "right" location. The valid HTML, <A HREF="foo.pl?chapter=1&section=2">, has worked fine in all versions of Netscape.
Netscape 4.0 began requiring the terminating semicolon on entities where previous versions often had not. For example, some HTML tutorials show their expertise with <P>Foo in examples, which Netscape 4.0 shows literally while previous versions had shown "<P>Foo". Again, valid HTML worked fine in all versions of Netscape.