The Advantages of Using Valid HTML
Added on Wednesday 24 Mar 2004
I have updated my page on why it is a good idea to use standard markup when creating web pages.
In Glasgow Caledonian University we have recently been deciding what DOCTYPE to use for university websites. Currently I would advocate the use of XHTML 1 Transitional - for the following reasons:
- Because it will encourage stricter adherence to standards based markup.
- Because using 'transitional' gives us more leeway when it comes to ensuring that pages will still display even when there are markup errors - as there inevitably will be given that people will be using tools to update pages, that don't always help create clean code.
- XHTML Transitional pages should display as consistently as HTML 4.01 Transitional assuming we markup pages according to the rules.
- We will have the option of - in the future - making simple changes to the meta information of web pages to ensure make the pages compliant with future browsers that understand XML.
Political reasons.
For information that is unlikely to be 're-purposed' (i.e. for PDA, or mobile phone use) HTML 4.01 is probably a better technical solution - as it is the only standard that works without 'workarounds and head-in-the-sand-ignore-the-fact-that-we-are-not-really-standard-compliant' botchups. See the article at http://hixie.ch/advocacy/xhtml for an explanation of why it is not possible to use XHTML correctly in current browsers.
It is important that we look as if we are forward thinking; for the most part the workarounds associated with using XHTML 1 Transitional do not have sufficiently negative effects on display or document structure to worry us unduly at the moment.
I would not underestimate the impact of appearing to be forward thinking (I have underestimated this in the past myself), or the political advantages to be reaped from adopting a approach that is fashionable. By using XHTML 1 Transitional, we don't have to spend loads of time explaining why we are using the 'older' HTML 4.01 standard - particularly as the reasons are hard to explain, and hard to understand.
Some things to read and look at:
- An introduction to standard HTML and accessibility
- HTML 4.01 or XHTML for university web pages? (I am now arguing for XHTML transitional - I've changed my mind)
- Conforming DOCTYPE templates:
- Choosing a DOCTYPE
- Fix Your Site With the Right DOCTYPE!
- Potential problems of switching to XHTML