webdev blog carp fishing blog

Blog Roll
Jun 26, 2006

Validating (X)HTML on your site and fixing them errors

There is a simple way to see if your web page's (X)HTML conforms to the w3c coding standards:
Just put a link to http://validator.w3.org/check?uri=referer on any page you want to validate, and when you open that url from your page you will see an error report on your page's validity.
Now as it turned out I have been quite naughty with regards to coding standards on this site's XHTML so I will have to fix some troubles, and I will fix them while writing this.

First I will have to get rid of all non closed tags errors as XHTML transitional does not allow non closed tags.
Then I should fix all uppercase markups to lowercase, XHTML only validates lowercase markup.

After that was done 81 out of the initial 90 errors were fixed . So that's quite a good result for just a few minutes work.

Now I will address the remaining errors, which are apparently content related. Some <p>  and other not allowed tags inside a <font> tag are the cause of some errors, it seems the WYSIWYG editor used inside the CMS sometimes allows for this kind of errors to happen. So I manually deleted the <font> tags that caused the problem, and now the page will validate.

Anyway, the page (at this moment) is found to be valid XHTML 1.0 Transitional, and therefore I am allowed to put the w3c icon right here! Valid XHTML 1.0 Transitional

I truly recommend using validation tools to check the output you are sending to your visitor's browsers, and fix as many problems you can.
You will learn a lot about valid HTML along the way, and will become a better (X)HTML coder as a result.
Especially the non standard browser visitors (braille reading browsers f.i.) will appreciate your efforts!

All in all it took me just about 30 minutes to find and fix all errors AND write this little blog about the process along the way.

There are no comments on this blog entry yet!

Send your comments to or post them right here!

name e-mail
comment title website url

Start > blog> webdev blog> ...

inloggen validate