Why I made the switch from Transitional to Strict

tagged Ideas by Jon

Okay, I’ll admit it. In the past I’ve been ignorant and lazy about using the XHTML Strict DOCTYPE. But no more. I’ve always known that Strict was "better", but only recently have I seen the light and reason to abandon my old ways and make the switch. This is why.

Strict GrannyStrict isn’t so scary once you get to know it. I promise.

Using a Transitional DOCTYPE is not bad. It just doesn’t accomplish what Strict does in terms of cleaner markup and moving web standards forward. If you don’t know the specific differences between DOCTYPE’s refer to the additional resources that I added at the end of this article.

Using Transitional is like smoking crack

The Transitional DTD is definitely easier to work with. It lets you off easy and allows for an occasional tag or attribute for style purposes. Need to quickly center or strike out text and don’t want to create a class? No problem! Just use the center and strike tags. Transitional will still smile upon you and validate. I guess you could say it just "feels good".

So, what’s the problem with that? One of your responsibilities as a XHTML/CSS master should be the separation of presentation from structure. Transitional’s allowance of inline style attributes can cause laziness and bad habits by allowing you to quickly throw in a center or underline tag here and there. Such things can be a hard habit to break.

Using a Strict DTD is a good way to keep yourself in check with good standards. If all developers did that, the world wide web would be a much better place.

Are you a control freak?

I’ve always agreed and supported the idea of the separation of style from structure thing. Yet, I’ve still been using Transitional. Why? Because I have felt the need to empower myself with the ability to control how a link is opened. Whether it be in the same window or in a new tab was my decision to make on behalf of those clicking on the link. The root of this power? The target attribute for anchor tags. This attribute does not validate using Strict.

This mentality changed recently when I started putting myself on the other side of the issue. I found myself getting pissed off and swearing at websites that would open in a new window when I didn’t expect them to or vice versa.

Unrelated to the target attribute but along the same lines are websites that use JavaScript to maximize a window. If your window is already maximized, it will shift it around and usually extend it beyond the desktop. To me, this is one of the most annoying things a developer can do to their website’s users.

Power to the people!

Because of the annoyance of websites that manipulate my browser, I began to think twice about using the target attribute. All modern browsers allow you to Ctrl/Cmd-Click on a link to open it in a new tab. You can also change browser settings and/or right click links to change how they are opened. I say Power to the People! Let them decide how to browse the internet for themselves.

If you agree with this perspective, there really isn’t a reason to use the target attribute. I now have no excuse to use Transitional. It will be Strict for me from here on out.

Additional Resources

Leave your mark...

If you liked this article please leave a comment and share it.

Add a comment Digg Stumble Upon Reddit

John Willemse
January 25th, 2008

Sensible choice! Nothing is more aggravating than a website deciding to resize my browser window, or opening a new instance of Firefox, when all I really want is a new tab.

January 25th, 2008

For the most part, my code has been 100% strict friendly for a while now, but I’ve always used transitional so I can still use the ‘ target=”_blank” ‘ attribute and not have to write a whole line of javascript just to open a window.

But the more and more I think about it, that’s just stupid. People have the option to open a url in a new window, and they have for a long time. Why not just let them decide if they want to stay in the browser or not?

Perhaps it’s time for me to go full on Strict as well.

January 26th, 2008

I personally like to navigate visitors away from my site if they click on an external link, leaving their main browser window on my page, so that when they finish with the link I’ve provided, they can simply close that window and return to my site for more – no matter how deep they go with the external link. This way, I can keep someone present and they remain conscious about where they came from and how to get back.

April 1st, 2008

Agreed that Strict is the way forward.

But what about the browsers?
Do they support the Strict DOCTYPE correctly, and then I mean the older browers like IE5?

April 4th, 2008

I would like to agree with Ben, if you don’t leave an anchor for someone browsing your site, you may lose them forever if you don’t open external links in a new window.

I also find myself closing windows on pdf’s when I wanted to stay with the site I was in. With a pdf you lose the navigation that the site has created and you can accidentally close the window you were in, so I like to open a pdf in a new window for people out of sheer convenience.

I however do not like sites that open each page you click through within their site in a new window. That is what a menu is for. Godaddy’s backend makes me so mad when I have to do some work in there for a client.

May 8th, 2008

I completely agree with you (and disagree with Ben and Pathfinder.) There’s nothing I find more annoying while browsing than a site that pops up a new tab/window when I click on a link. Far from keeping me as a visitor, such tactics make sure I will deliberately close that site.

Now that WordPress finally has a RTE that produces standards-compliant code, I can start using the XHTML Strict DOCTYPE!

November 6th, 2008

Wanting to open new windows should not keep you from using strict. You can’t use target=”_blank” indeed, but you can use


and validate as HTML 4.01 strict.

January 24th, 2010

Agree! I just recently switched to Strict, myself. I am so left out. :p

Add a comment

This comment system uses Gravatars for customized avatars. Get your account here.

If this is your first comment, it will be held for moderation. I'll get to it as fast as I can. Thanks :p