The Importance of Valid HTML Code
Why is it important to make your HTML code compliant with the accepted standards? There are several reasons to that.
In the earlier days of the Internet, the majority of websites were coded with no standards in mind. As long as they looked more or less acceptable in browsers, nobody bothered to check the code and verify proper nesting of tags. It was also quite common to use tables for controlling layout, which is very easy and often works even if the HTML of the site looks like "tag soup". Of course, sometimes an attempt at adding more content to the website resulted in having the layout of the website totally broken, but it was often fixed by adding yet another nested table. It added to the code bloat, but nobody cared.
But everything changes with time, and the quality standards to website coding were no exception. People started to realise that sloppy coding affected the download time, the consumed bandwidth, the business image of the website and many other things. Search engine optimisers spotted the importance of light code for SEO and rankings; accessibility has become a more important factor too, which led to rejection of tables as the major way of controlling layouts. Tables are not very accessible as they interfere with the way screen readers read pages; they also cause unnecessary code bloat, and thus many web designers started switching to CSS-controlled layouts. And for CSS, validity of the code is much more important than for tables: a single mistake can destroy the way the page looks, ruin the webmaster's efforts at achieving cross-browser compatibility and increase the probability of a critical mistake when updating content on the website.
For all the reasons above, it's become "fashionable" to comply with the W3C (World Wide Web Consortium) standards for HTML. At the same time, many webmasters started switching to XHTML (eXtensible Hypertext Markup Language), which declares many tag attributes deprecated, thus forcing webmasters to write lighter code and to use CSS more extensively.
Let's mention the main reasons to stick to valid code once more:
- better cross-broswer compatibility;
- better accessibility;
- easier maintenance;
- reduced download time;
- reduced bandwidth consumption;
- better business image;
- better compatibility with the search engine spiders.
However, in spite of the above mentioned factors, many website owners still prefer to leave their websites as they are and disregard the multiple HTML errors. Many web designers pay zero attention to the code validity when designing new sites. The reasons why it happens are very obvious too: valid code requires additional attention on the part of the webmaster, and this means more time required to build a website. This leads to reduced economical effectiveness of the service, as not every client will agree to pay extra for valid code. Many website owners have never heard about sich a thing as valid HTML; those who have, often don't realise that it's indeed important.
Yet a new tendency is obvious: over the last years the demand for standard-compliant, table-free websites has increased considerably. In case you would like to check if your site is valid, visit http://validator.w3.org.
Post new comment