tutorialtastic

Validating Your WebPage to XHTML 1.0 Strict

I'm going to assume that you're following this tutorial because you already know the basics of XHTML Transitional — you know about compulsory alt attributes and quoted attributes, you know that you must use lowercase and that the doctype is mandatory. If you don't, I suggest you start on the Validating to XHTML Transitional tutorial.

First things first you need to replace the Transitional doctype for the strict one:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

Now you need to get rid of any styling attributes from your documents — things like height="100%" and border="1". The whole point of XHTML Strict is completely clean up a document — removing presentational code by specifying things with CSS. I cover this in a little more detail in my separating style from content tutorial.

The Strict doctype is just that — strict. Strict about deprecated tags which the Transitional / Frameset are unbothered by. This includes the tags deprecated early on in HTML 4.01:

..and a couple of others:

There are also tags which aren't deprecated, but are advised against as better effects can be achieved with CSS, which as mentioned earlier is the whole point of the Strict doctype:

That's it — it's not as hard as people think. Once you think you're ready, you can validate your page and away you go.

Tags: ,
Last Updated On: 06th February 06 by Jem
Bookmark At: StumbleUpon, Digg

tutorialtastic — ultimately better than pixelfx
Copyright © Jem Turner 2003-08. (About | Disclaimer | Link In)