The purpose of a HTML validation exercise is to ensure that there are no mistakes in your code that would lead to incorrect display of your pages. W3C, the organization that maintain the HTML language has a number of tools that developers can use to check for errors in their code. W3C recommends validation because it helps developers create websites that compatible across various browsers and platforms. In addition, validated websites are easily visible by search spiders and also have improved user experience and accessibility.
Tools for validation can be accessed online or as standalone versions that run from your computer’s hard drive.