validation

Validating Code

When writing HTML, a good practice to get into is making sure that this code is valid. Valid code has a lot of advantages. Your page is more likely to look the same or how you expect it to in more browsers and the browsers will have less trouble dealing with tangled code and old tags.

To check your code you can use the W3C HTML Validator, this will be added to the resource section.

What this validator does is takes a look at the DTD at the top of your page and takes the version of (X)HTML and checks that against a list of standards and rules. What the validator then does is flag up any issues so that they can be fixed.

Creating valid (X)HTML is a great routine to get into. So its worth popping over to the validator and bookmarking it for later use.

Tags: ,

Wednesday, October 29th, 2008 HTML, Simple Code Snippets No Comments