Welcome to WebmasterWorld Guest from

Forum Moderators: incrediBILL

Message Too Old, No Replies

XHTML Strict vs Transitional?

What's the difference between strict and transitional?



9:44 pm on Mar 23, 2005 (gmt 0)

10+ Year Member

Hello FOlks, I thought I'd drop the question in there. I've been working with XHTML transitional lately.During my research i found that a lot of web designers use XHTML strict for some reason. I'd like to know what's the difference between them and what advantages and/or disavantages of each of them. Thanks for your support folks!

JAB Creations

6:13 am on Mar 24, 2005 (gmt 0)

WebmasterWorld Senior Member jab_creations is a WebmasterWorld Top Contributor of All Time 10+ Year Member

In strict you're not allowed to use attributes that can be used in CSS.


<div align="center">


<div style="text-align: center;">

There may and probally is more to the difference between strict and transitional as I'm sure someone will point out.

I code my site (with the exception of my frame files) entirely in strict now (while you may rarely come across a page off-hand that hasn't been updated). If you want a decent example of strict code to go by view the source on my site. There are validation links at the bottom left that will tell you if the code is valid as well as at the top/right of the home/news page which additionally includes a validation link to my default css file. My site's url is in my profile.

I'd love to give you some other examples of strict code but I honestly draw a blank. Pretty much all code you will come across is transitional.

Keep in mind that transitional and strict code do not effect whether a page is rendered in standards or quirks mode. This is more dependent on browsers (I think but not entirely sure). For example if you do not have the DTD line as the VERY FIRST LINE in your file then IE automatically renders in quirks mode which is how I get that "browser" to render the white div you see. Other browsers render my site in standards mode. There is a link at the bottom of my news page you can test until I put a technical table at the bottom of all my pages.

I'm still learning so defintly listen to whatever others have to say and keep asking questions! :-)


6:27 am on Mar 24, 2005 (gmt 0)

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

Whether we're talking about HTML or XHTML, strict mark-up does not allow the "presentational" elements and attributes that have been deprecated [webmasterworld.com], whereas transitional does - because it is a transition from the tag soup that was HTML3 to the separation of content and presentation.

Strict mark-up is more solidly "future-proof" but it can require some un-learning and re-learning, especially because rendering instructions are now all moved to the stylesheet, no fudging allowed.

I've found that going from transitional to strict mark-up is the big step, rather than moving from HTML to XHTML, which is of debatable utility unless you really need or will need XML.


7:07 pm on Mar 25, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

I've found that going from transitional to strict mark-up is the big step, rather than moving from HTML to XHTML ...


Like many webmasters I moved gradually from "street HTML" to "almost valid" HTML to validated HTML Transitional to validated HTML Strict to validated xhtml 1.0 Strict.

Each of the steps leading to HTML Strict was painful, as it involved learning new concepts and accepting new ways of doing things. On the other hand, the final transition to xhtml was mechanical, done almost entirely using HTML-Tidy (OK, plus a lot of programming to clean things up), involving basically no new ideas.


3:03 am on Mar 27, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

Right on the money tedster and Mohamed_E - the pain was in the early baby steps. Once into html strict, moving on into Xhtml Strict was practically a piece of cake.

I think the thing I like best about it is that it is so clean.... and it forces you to THINK about how best to utilize CSS and what you can actually accomplish using CSS, instead of just doing things the sloppy-coder, old-style-easy way.


1:30 am on Mar 31, 2005 (gmt 0)

10+ Year Member

Hey guys, after a few researchs on this subject; and obviuosly your help; I have comprehended a little bit better about the strict vs transitional. Strict: anything deprecated (condemned) or made obsolete is not allowed, whereas, Transitional allows deprecated elements in the markup. I like how Tedester adressed "Strict mark-up is more solidly future-proof". It's true, due to a inconsistences between browsers. So I'm going to stick with transitional DTD. Thanks guys!

Featured Threads

Hot Threads This Week

Hot Threads This Month