In a discussion over at “molly.com”:http://www.molly.com/, “Fergus Wilde asks”:http://www.molly.com/2005/01/30/outdated-html-guides/#comment-6726 which standards to use:
bq. … I’m keen to ‘do the right thing’ – but what *is* the right thing? What’s the most useful, correct, forward looking standard I can employ that won’t leave our largely non-tech user base stranded? Even most of the open source tools still make it a deal easier to use html 4.x than xhtml 1.1, into which I’m looking.
I have a very simple, straightforward answer to this:
It does not matter which standard you conform to. Do whatever suits your needs best. It doesn’t really matter whether you use HTML 4.01 Strict or transitional, XHTML 1.0 or 1.1. Just do _the right thing with the standards you have chosen to conform to._
So, what _is_ doing the right thing then?
* Understand that HTML and XHTML defines both _syntax_ and _sematics_.
* Understand that syntax and semantics are equally important. Having a syntactically correct document doesn’t help if you litter your documents with @Important!@ @
@ everywhere. Neither does it help if your documents are semantical masterpieces if you put @
heading@ in your document.
* Where you can choose between implicit and explicit syntax: Choose explicit syntax:
** Don’t omit optional start tags.
** Don’t omit optional end tags.
* Don’t use the latest and greatest standard, just because it is the latest and greatest standard. There is _absolutely no need_ to use XHTML 1.1 unless you need “Ruby annotation”:http://www.w3.org/TR/ruby/ – likewise:
** Unless you parse your own output using an XML parser, or plan on inlining XML data, such as MathML or SVG, you _don’t need XHTML *at all.*_
This site uses XHTML 1.0, something I, in hindsight, regard as a huge mistake. I don’t _need_ XHTML. I don’t produce MathML, I don’t use SVG. I don’t parse any of the HTML output with an XML parser. I should really, really have chosen HTML 4.01 Strict.