Valid HTML is the best practice when it comes to websites. Though it can be difficult, it is worth the time. If your code is valid, it won’t have to be auto-corrected by browsers and it won’t cause problems with search engine robots.
I’ve talked about browser ubiquity testing before and the importance of working out problems with code to make sure a site renders correctly in browsers. To sum up, when code is written correctly a web browser doesn’t have to interpret and correct it.
If web browsers can do their own code correction, why is validating the code important? Browsers can correct code, search engine robots cannot. They are left to fend for themselves without that advanced feature. This can cause problems with them parsing your site in full and finding all the content on a page. The spiders may get stuck on a piece of messed up code and stall which will eat up the time they have to spend on your site.
There are several tools available to help validate your code and the best one comes from the W3C (World Wide Web Consortium). The W3C is in charge of writing standards for web code and has played a key role in the development of the internet as we know it. They know what they are talking about.
Correcting the code can be a real headache if you’re not really good at coding so I recommend contracting a web developer to help. A good web developer is an expert in this kind of thing and the process will take a lot less time than a novice trying to work it out.
One thought on “The Importance of Valid HTML”
Comments are closed.
An update on this post: I had a dramatic example of this with a recent client. Their site had tons of errors that made all of their pages fail validation. After I identified the problems, the client put their developers to work on the project of making the site valid. It took several days to complete but after they were done, the number of indexed pages in Google rose from 2 to 4,300. The number of external links credited to the site jumped from 19 to 1,090 since Google could correctly attribute links to the site. Valid HTML makes a HUGE difference!