W3C (or the World Wide Web consortium) is the main international standards organisation for the world wide web - basically they're the ones calling the shots when it comes to HTML and CSS specifications. They make available a validation tool on their website which can assess any URL and flag up issues with the HTML - in this article we'll look at how to use this and why it's important to do so.
Especially for new HTML coders, this can be a valuable method of finding bugs in your code (i.e. non-closed tags, or incorrect nesting) which could lead to all kinds of errors as you develop your application further.
You never know when things can change, especially when it comes to how browsers render your website. By ensuring that your HTML is W3C valid you can be sure that you are as close as possible to the current HTML standard, which brings with it a multitude of benefits. These include search engine optimisation, and if anyone else ever needs to look at or modify your code they should immediately understand exactly what they're looking at.
Especially if you work in the web field, your peers and potential employers will be going through your websites with a fine tooth comb at some point - if you can't even get HTML right, that's never a good sign!
The tool itself really could not be easier to use. Most of the time you'll probably want to validate based on a URL, so simply select "Validate by URI", enter a web address and click "Check". You can also validate by uploading an HTML file, or by copy/pasting HTML into the "Direct Input" tab.
After you submit your HTML a report will be generated and hopefully you'll see a nice green message telling you that there are no errors or warnings to show (like this).
If not, it means you've got some warnings or errors on your page. Warnings are things which W3C recommends you change, but are not critical to the basic functioning of the page. Errors really should be fixed, as these could cause serious problems and display issues within your website. There are dozens of different errors which the validator can pick up on, far too many to go through here, but they should be pretty self-explanatory and, if not, a quick Google search containing the error will pull up hundreds of helpful resources.
Hopefully this article has helped you get to grips with HTML validation and why it's important! For most websites it's so easy to comply that there's really no reason not to, but just remember that while it does matter, it's not the be all and end all so if you have a niche situation or are using some unconvential markup for good reason, don't worry about getting 100% validity too much.