Web Developer Tools Validation Menu

Earlier lecture pages have stressed the importance of validation. The Web Developer toolbar makes the validation process very easy. It's simply a matter of viewing your web page in a browser from either your local hard drive or an internet web server and then clicking a validation item on the Web Developer Tools menu!

To perform validation, open the Web Developer Tools menu. You will see two sections in the menu that offer both HTML and CSS validation. The validation items at the top of the menu are to be used on internet web sites, and the validation items at the bottom of the menu are for use on web pages launched from your local hard drive.

It is advisable to adopt the habit of validating your document's HTML first. Once it has passed validation, then use the CSS validator.

If you're a person who likes to use keystrokes, use Ctrl+Shift+A to validate Local HTML files. Use Ctrl+Shift+H to validate HTML pages on a web server.

Just for fun...

There aren't many opportunities to peek behind the intimidating facade of the IRS, but here are the results of using Validate CSS on their web site:

Web Developer Validation IRS Error Example

Note: If your code editor uses line numbers, the validation results tell you what line the problem is on.

In addition to errors, the validation results show warnings. These are not problems with standards compliance but do point to potential issues. A common warning is that a rule containing a color declaration does not contain a background color declaration, or vice versa. Since color inherits automatically, this is usually not a problem unless a user has customized their browser default colors. But if you want to get rid of the warnings and build the most foolproof site possible, you can usually resolve this by including "inherit" as a value. This will work in most situations.

p { color: blue; background-color: inherit; }

Now that you have this powerful tool at your fingertips, you might be surprised by how many large corporate web sites do not validate! Some of them no doubt fell into the trap of coding their pages for the non-compliant IE6 browser since it had such a large share of the browser market a few years ago. Today Firefox has become a real contender and IE7 has joined the ranks of standards compliant browsers and those corporations with IE6-centric web sites have some serious clean up to do before things really start to break!