Down with Transitional!
When writing websites, either in HTML or XHTML, you must have met with such a term as DOCTYPE. It declares the document type - which you can choose out of three for HTML 4.01 and three for XHTML 1.0: Strict, Transitional and Frameset. The first is “the correct one” - thanks to which the Web can continue developing, and new standards, like XHTML 2.0, come into being. The second, Transitional, is to help people who aren’t familiar with new Web standards and allow them to move smoothly from the languages which they had used before. Frameset doesn’t bother us at all.
W3C, when it’s created new standards, has wanted to make websites’ codes clean. But there are lots of of unnecessary elements which just clutters the Internet, such as <font>. They are responsible for what the user sees on his screen. But isn’t it CSS to make up the visual part of website? Yes, that’s right. That’s why DOCTYPE Strict has been invented - to separate a website’s code from the elements which make it look as it’s supposed to look like.
If you think that you make the Internet better by using <br /> instead of <br> - you’re wrong. It isn’t XHTML to be the standard of the future, it is DOCTYPE Strict. Thanks to it the websites will be displayed in the same way in all browsers, CSS will be able to develop and W3C to repair all the bad things that the table-<font>-webmasters have done.
To let the DTD Strict work properly, some of HTML language elements had to be permanently removed - so that webmasters had to use style sheets rather than HTML. Here’s the list of them:
- basefont
- font
- center
- applet
- dir
- menu
- isindex
- s
- strike
- u
And here’s a list of attributes that’ve been removed:
- align
- bgcolor
- border
- clear
- color
- compact
- face
- height
- hspace
- type
- vspace
Moreover, the target attribute has also been removed - so links aren’t allowed to be opened in new windows now. Why? Because the “back” browser button doesn’t work in these cases, and modern browsers can open new links in tabs instead of windows, so why would people make them open links in a particular way rather them let them choose?
Separating the presentation part of the website from the code one using CSS allows you to make different version of one website with only one HTML file and to change them in a very easy way. Just look at CSS Zen Garden: it has over 100 different layouts to choose from and all of them use the same HTML file. Amazing, isn’t it? With DOCTYPE Transitional achieving something like this wouldn’t be possible, because the colours and site elements’ position would be defined in the page’s code.
To sum up, use Transitional only when it’s really needed. Maybe your website, written for DTD Transitional, validates as Strict as well? If yes, decide wisely which to choose. The W3C’s Transitional description may help you:
This is the HTML 4.01 Transitional DTD, which includes presentation attributes and elements that W3C expects to phase out as support for style sheets matures. Authors should use the Strict DTD when possible, but may use the Transitional DTD when support for presentation attribute and elements is required.
Did I convince you? I hope so. Transitional isn’t worth using.
Do
