Once you've written a web page, you can upload it to an HTML validator. This site, run by the web's standards body, will check that your site is valid ('correct') HTML, and give you some idea of how to fix it if it isn't. This is an essential step in the development of any website – as vital as running your text through the spell checker – but whenever I recommend it there's always someone who wonders why it's so important (and also why they should bother). Well, I'll tell you why.
Don’t Just Guess Know Your Code is Right
If your code validates, then it's correct, and therefore very likely to work as intended on every web browser, and there are more each day, out there. If you don't validate your pages, then you might find that people who visit your site with less forgiving browsers see nothing at all. These are customers lost.
Correct code is more likely to display correctly on many different browsers, because it puts them into their ‘standards’ mode. If code is even slightly incorrect, many browsers will use a different way of displaying it, known as quirks mode, which is designed to handle old and bad HTML, takes a long time and may make your page end up with errors you didn't expect.
Without web standards, you end up going back to the bad old days of having to develop entirely separate web pages for different browsers. Not a good idea unless working is your hobby. Validating by the standards ensures that all working browsers can view your content – if they can't, the fault's with them, not with you.
Give Your Customers What They Want
I'm putting this first because I feel it is probably the most important reason for using valid code. You put up a web site for people, i. e. your customers, to see, right? And you want to look professional, right? Well don't validate your code, heck you won't miss the visitors who leave your site cause the code is broken and making your page look crappy in their browser, will you.
Be Friendly To The Search Engines
When it comes time for a search engine to add your page to its results, it's going to have a much easier time understanding the page if it's been validated. This will often get you a higher ranking in the results, which means free visitors, and more money, for you. If your page isn't valid, search engines will often miss keywords in your pages or not understand your navigation, and may list nonsensical parts of your code under your site's name in the search results, not exactly helpful to potential visitors who want to know what your site is about.
Access All Areas
More and more people are accessing the web using mobile devices like mobile phones and PDAs, and these devices have a lot of trouble with code that isn't valid. Because they have limited processing power, it would take them a very long time to try to untangle invalid code – they will simply strip out the formatting and do the best they can with it. What is the point in designing a page that a lot of your customers will never see? Writing valid HTML lets users with mobile devices see your pages as you intended.
Disability And technology
When you write valid code, it becomes much easier to view with things that aren't web browsers, such as screen readers. Technology for disabled people doesn't tend to be as forgiving as web browsers, so having valid code is important when it comes to working with these programs. This is also a good reason to use an external style sheet, as it will make it easier for their readers to read your web page.
Before your code will validate, I'm sure you realize it’s a good idea by now, you need to explicitly say which version of HTML you had in mind when you created it. This future-proofs your code, as each version of the standard doesn't change once it's been decided on: a valid XHMTL 1.1 page will always be a valid XHTML 1.1 page, even if everyone else has moved on, and they will, to XHTML 5. Once you've validated your site once, you can put it on the web and be confident that people are going to be able to read it for a long time to come. You can see a list of valid DTD's here http://www.w3.org/QA/2002/04/valid-dtd-list.html also you won't be able to validate your code without the right DTD and if you don't have one it will cause IE to view your page in quirk mode which can really suck.
Wrong and Wrong Again
If there's a mistake in your website's code, validation gives you an easy way to track it down and fix it. Before validation, people had to test their site after each change and look carefully to make sure that nothing had gone wrong. Writing valid code lets you use programs that will examine what you've written and point at the exact place where the code doesn't validate.
A List of Validators to Get You Going
Here are a few validators that you can try. Most HTML validators are online, but there are a few that you can download and use on your own computer.
The W3C validator: validator. w3c.org
The WDG validator: www.htmlhelp.com/tools/validator
CSE validator: www.htmlvalidator.com (downloadable)
WebTechs validator: www.webtechs.com/html-val-src
Doctor HTML: www.doctor-html.com (downloadable)
You might also be interested in visiting the W3C's main site at w3c.org, as well as the Web Standards Project at www.webstandards.org.
Valisdation is not the hassle that some designers think and it’s well worth the effort.
Free ebook and tips http://www.site-builder-review.com/