HTML and CSS Validation

Most people who are not in the website industry do not realize that the validation of HTML and CSS validation are controversial issues with some. This article focuses on some of these positions, backing these discussions and providing some perspectives on issues that are increasingly coming forward in web development. If all goes well, the article will also provide a practical method that overworked webmasters can use to improve their website.

From background information: What does validating HTML or CSS mean?
For those unfamiliar with what validating means of a Web page (IE validating your HTML code or CSS), it basically refers to using a program or online service to check that the Web page you created is free of errors.

In particular, an HTML validator checks to make sure the HTML code on your Web page conforms to standards set by the W3 Consortium (the organization that publishes standards for HTML). There are various types of validators - some check only errors, others also make suggestions about your code, telling you when things somehow writing could be carried out (say) unexpected results.

The W3 Consortium has its own validator online that you can use for free. It can be found at:

A CSS validator checks your Cascading Style Sheets in the same way, basically, most of the check to ensure that they conform to standards set by the CSS W3 Consortium. There are also some who will tell you what features of CSS are supported by which browsers (since not all browsers are equal in their CSS implementation).

Again, you can get free validation for your style sheets from the W3 Consortium:

There are numerous other validators around, free and commercial, focusing on various aspects to ensure that your code will run trouble free through browsers and platforms.

Note that it validates your webpage does not ensure it will appear as you want in various browsers. It simply ensures that your code is without errors of HTML or CSS syntax. By ensuring that your code appears correctly in different browsers require testing across browser.

Why validate your HTML code?
Proponents of validation (HTML and CSS validation, of course) say there are a number of reasons why you should validate your code:

1. It helps the compatibility of Cross-Browser, Cross-Platform and Future
Although you may be able to create a Web page that appears to work at your preferred browser (whatever that may be), your page may contain errors (HTML or CSS errors) that are not displayed with this browser due to a capricious or an existing bug. Another person using a browser that does not share this particular bug will roll look up a page that does not show properly. It is also possible that later versions of your browser will correct this bug, and your page will be broken when people use the latest incarnation of the browser.

The encoding of your pages so it is correct without errors will result in pages that are to run through browsers and platforms (IE, different systems). It is also a form of insurance against future versions of browsers, since all browsers are designed to comply with existing standards of HTML and CSS.

2. Search Engine Visibility
When there are errors in a web page, browsers typically try to compensate in different ways. Hence some browsers may ignore the broken elements while others make assumptions about what the web designer trying to achieve. The problem is that when search engines obtain your page and try to analyze it for keywords, they must also ensure decisions about what to do with errors. Like browsers, different search engines will probably take different decisions about those errors on the page, resulting in certain parts of your webpage (or perhaps even the entire page if your error is early in the page) not indexed.

The safest way, we take it, is to ensure that your Web page valid without error. In this way, there is no dispute over which part of your page should be scanned for keywords and the like.

3. Professionalism
Even if you look at your website with all the various browsers in existence on all platforms in use (Mac, Linux, Windows, FreeBSD, etc..) And find that it works perfectly in all, the errors reflect poorly on your site on your competence as a Web Developer.

The outcome is twofold: firstly, a poorly coded web page indicates that the web designer does not know its essence is a workman or wet, and secondly, it affects his marketability.

What if it does not validate?
Those who are against a blanket rule about validation often cite the following reasons:

1. The validation is no guarantee that the page works
Even if you validate your code, you must still examine various browsers. Having the code without syntax errors does not mean that the code of HTML or CSS is what you want. Therefore some of the proponents of this view argue that the main goal when designing a Web page is to secure is viewable and usable by your visitors, not a certain goal esoteric standards compliance.

2. Time constraints for the conversion
In an ideal world, you want all your pages are usable and error free. In the real world, however, many web designers with thousands of existing pages will be hard pressed to find time to convert all pages so that they validate correctly. Since these pages are already well on the Web, with browsers and search engines exist, time is better spent doing the work that is actually productive.

3. The average visitor does not check your source code
Against the argument about professionalism is the counter argument that the average visitor to your site is not likely to move your site looking at source code to your pages in an effort to locate errors in HTML or CSS. For the visitor, how the page is evident in his browser is the true test of the competence of the web designer.

A possible solution
As some web designers, I started designing web sites long before I am aware that there were tools that could validate my pages for accuracy. Before I started to validate and correct my pages, I already had hundreds of existing pages that I had to correct, including pages and on

My concerns were mostly compatible cross-browser and cross-platform as well as indexability search engine. I did not want an error to my pages that I could miss seeing my browser but that creeps up in other browsers, or search engines. However, the problem was that converting hundreds of pages is not exactly my idea of the work of a pleasant day.

I decided to adopt the approach that I saw on a website. If I remember correctly, I think it was the consortium's own website W3 mentioned this method. At that time, they had a notice stating that they knew that not all their pages are compliant. However, all new pages they created validate correctly, as all these old pages they have updated.

I realize that this is not the "ideal" to which some webmasters argue, but it is a practical solution for a web designer with a lot of existing pages. If you're in the same boat, with too many existing pages to look any better, you might want to consider taking this route. He can not salute your pride (IE, the pride of the craftsman to produce a perfect job), but at least it will help you cope with the workload.

How often is it that I should validate?
Some validate every time they make changes to their pages because careless errors can occur anytime. Other validate only when they bring a significant change in design.

I have found that delayed aid of a validator to make sure I remember to validate: to go online just to validate my pages tends to make me put off until later validation, with results acquired from time to time overlooked. For those not familiar with the terminology I use when I say that "the Validator offline" I simply mean a validator that I can download and install my own computer so that I can run my pages without having to go Web site of the W3 Consortium.

By validating your HTML and CSS coding standards for compliance has some advantages: it protects your pages against problems caused syntax errors in your code due to different ways of interpreting errors by search engines and other browsers. However, if you have a large number of existing pages that have not been validated and have not been corrected, but still are functioning well in search engines and other browsers you may need to consider some sort of strategy (such as the one I used) to prevent overloading the webmaster.

(800) 880-1716   |   Contact Us   |   Long Island   |   Sitemap © 2005 - 2010 NGKSoft. All rights reserved.