views:

816

answers:

9

My company is looking to replace all websites in the group with a new CMS-based system and similar designs/styling, with E-Commerce functionality being added in a future phase. It's too big a job for me to do in a reasonable time-frame, so we are going to be inviting tenders from agencies.

I'm currently in the process of defining the technical requirements, and I'm intending to dictate that the selected system must have a Strict DOCTYPE and must trigger Standards mode (or Almost Standards Mode) in common browsers, or something to that effect [We have to allow Almost Standards Mode to cater for IE, obviously].

I've done a bit of homework an all of this - I don't want the spec to be limited by my ignorance, after all - but it won't surprise you all that I've found that 'current opinion' is completely divided on what is good practice.

There are plenty of people who advocate HTML4.01 Strict (fair enough), plenty of people who recommend XHTML1.0 Strict served as text/html (I'm OK with this too), some who recommend HTML5 but restricted to HTML4.01 tags (erm... still not sure if this is a good idea or not, but I see the principle), but also a not-inconsiderable number (including people on other SO threads) who recommend XHTML1.0 Transitional.

I just don't understand the reasoning for this... OK, you may happen to want to temporarily use something that been deprecated, and thus Transitional seems sensible, but some people recommend XHTML Transitional for new build.

After checking out other companies' sites for design inspiration, I've notice that many sites (if they have any DOCTYPE specified at all) will refer to a Transitional DTD. OK, we all know there is plenty of crap on the web, so perhaps I shouldn't draw too many conclusions. But checking out Web Design Agencies that we've come across, there are an amazing proportion of them (the vast majority of them, I would say) are using XHTML 1.0 Transitional.

Fine, so you don't necessarily have to be an expert to call yourself a Web Designer, but the sheer volume of Transitional layouts makes me wonder... Most of the sites seem to be otherwise reasonably designed (CSS layout, validating, accessible etc).

So, having finally got to the point(!), is there some reason why such a large proportion of these agencies are opting for Transitional DOCTYPEs? Am I missing something, something that I need to consider for my new sites?

Edit: Yeah, I realise the purpose of the Transitional DTD - I was just suspicious that so many otherwise-competent web developers are clinging on to deprecated markup. I wonder if you guys are correct and the answer is simply that they are a) are too lazy to get their own website to validate, or b) sticking with the default DTD of their preferred IDE.

The key re-assurance for me is that (according to your responses so far) I don't seem to be missing out on some key reason to use a Transitional DTD.

Edit 2: Regarding our CMS project - all the short-listed agencies thankfully seem to have their heads screwed on - Strict, valid and accessible.

+1  A: 

In XHTML 1.0 Transitional you have <center> <font> and <strike> which is not allowed within the strict version.

The reason is mostly portability between other templates. A nice article about that is here.

Ólafur Waage
And that's a good thing because...? You should be using CSS instead of coding presentation directives into your markup.
John Topley
Added the reason.
Ólafur Waage
+6  A: 

Simply put, XHTML Transitional allows developers to more easily migrate a legacy HTML codebase over to that doctype. The Transitional doctype is more forgiving than Strict, but is meant as a stepping stone toward Strict.

Here's a good article talking about Transitional vs Strict: http://24ways.org/2005/transitional-vs-strict-markup

Ron DeVera
I just get the impression that it's not a stepping stone to anywhere, that Transitional is where this multitude of sites will remain.
CJM
I think it's worth pointing out that not every decision enforced by Strict is necessarily rational or reasonable - sometimes transitional let's you do what's required. The inability to put block content in an anchor stands out for me.
annakata
+2  A: 

I think many people use XHTML 1.0 Transitional because it seems advanced, up-to-date or even beyond (XHTML is the future, dude!) on the one hand but on the other hand still does allow this “nasty stuff” like center, font, align, border, target etc.

Gumbo
+1 I totally agree.
Marco Demajo
+1  A: 

Most of the web doesn't validate, as either transitional or strict. Transitional is generally easier to work with, but I think a more telling reason it's used more frequently is that it's also the default for editors like Dreamweaver and many CMS's use it as their default doctype.

VirtuosiMedia
+3  A: 

XHTML 1.0 Transitional is more forgiving than its Strict counterpart and is the easiest to transition to.

For example in Strict DTD, you would need to write JS to open linked pages in a new window... and target="_blank" would flag an error (eg. from Designing with Web Standards...)

Strict is definitely the way to move forward, but transitional is the best choice for, Transitioning.

suBi
Fair point. I know a guy who validates against strict but uses specific non-strict techniques. He checks that his validation failures are only due to these expected reasons. That is, validation is a tool rather than an objective.
CJM
I hate that JS hack. It's a loophole in DTD, but it's against the spirit of the spec (i.e. don't mess with users' windows).
porneL
+8  A: 

I'm going to take a hard-nosed approach and say that Transitional doctypes are popular because some people are lazy or just don't care. Somebody told them they should validate their code, and transitional is the easiest to validate because it allows deprecated markup.

I agree with those who answered this previously and said that transitional doctypes are for transitioning to strict. Those are the only situations where I've used them.

Any new development should definitely be with a strict doctype. The choice of Strict vs. Transitional is more important than XHTML vs. HTML4. I would strongly recommend to you that in your technical requirements you require Strict.

Scott
I like this response, but I'm not sure whether it's because simply it appeals to the cynical part of me - but Strict is definitely staying in the spec. I just hope we have someone out there with a tender to match it!
CJM
@Scott: you say: "...Transitional doctypes are popular because some people are lazy or just don't care." I don't think it's only about being lazy, web design requires to do things fast 'coz the revenues are getting smaller and smaller. In Strict mode you could not even use an IFRAME tag that in my opinion are still very useful in nowadays. Think at someone who wants to quikly insert a google map via IFRAME in its website using the IFRAME way.
Marco Demajo
It's been my experience that cutting corners during the initial development causes massive headaches during the support/maintenance phase.
Scott
+4  A: 

The default of DOCTYPE of MS Visual Studio is XHTML 1.0 Transitional.

unigogo
Yeah, despite the technical distinctions described elsewhere, this, along with the defaults of IDEs and the copy/paste nature of most of the web, is the real reason for the popularity of the Transitional doctype.
Alohci
+1  A: 

Most web authors don't validate their pages, in which case, there's very little to choose between the DOCTYPEs and no good reason to change from the IDE default. The only practical difference to browsers between Strict and Transitional is that strict triggers Standards mode and Transitional triggers Almost Standards mode in gecko, presto, webkit, etc. Pages that actually require Standards mode behaviour are very few and far between and certainly won't affect the overall proportions that you see on the web.

It's worth noting that HTML 5 is being written without a Strict/Transitional distinction, largely because the authors of that recognise that the Transitional DOCTYPEs of XHTML and HTML4 are widely misused.

Alohci
+1  A: 

Good luck bludgeoning your pages into validating if you're using user input in a CMS. XHTML Strict doesn't like really common things like target="_blank" (we can have a debate about that, but people still use it). Additionally, if anyone adds the default youtube embed html, it won't validate.

C. Alan Zoppa
Validation is part of the journey rather than the destination. Providing the core site structure validates I'll be content; obviously the users have a limitless ability to foul things up, and there is not a lot you can do apart from a) train them, b) monitor them.
CJM