Why Transitional Doctypes are Better for Wordpress Blogs
There are many articles and resources out there that preach about XHTML versus HTML and various DOCTYPEs and their uses (a list to a couple of those articles is at the bottom of this post). But regardless of the reasons and arguments for either side, it is very clear that transitional DOCTYPES are better than strict ones for Wordpress blogs.
Strict DOCTYPEs are…well, too strict. They don’t allow for certain (necessary) tags to remain in your Wordpress blog. Tags such as <strike> are used by Wordpress to drop a line through text. Using a Strict DOCTYPE with this is impossible; you will receive an error. Time and time again I see this while reviewing Wordpress themes and plugins. It doesn’t need to happen.
Changing Your Doctype in Wordpress
Under the Presentation tab click on Header. Find the following selection of code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
It should be at the top of your Header file. If you have a different setup or different theme file setup that makes it tough to find this section of code, leave a comment and I’ll see what I can do to help.
This is the code you do not want to use:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
This is the code you DO want to use:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
The xmlns and the language_attributes tags can stay where they are.
Articles for more information:
- http://alistapart.com/stories/doctype/
- http://www.w3.org/QA/2002/04/valid-dtd-list.html
- http://24ways.org/2005/transitional-vs-strict-markup



Subscribe to our RSS Feed





The transitional DOCTYPE is supposed to be transitional - it was created so sites would still validate as they transitioned over to the strict DOCTYPE. By continuing to use the transitional DOCTYPE you promote a refusal of XHTML/CSS based design.
The strike tag you refer to is outdated, as it refers to the appearance of the text within the tag. The correct tag that should be used is del which refers to what the tag is accomplishing (it signifies deleted text, via the strikethrough, unless otherwise styled).
See 24ways for a discussion about Transitional vs. Strict doctype.
I’m with Michael, the problem isn’t with the designers, it’s with Wordpress as it’s still using outdated chunks of code.
Using the latest (and semantically correct) doctype is like updating your Wordpress blog to the latest version, perhaps you don’t quite see the use yet, but there are improvements under the hood.
I see your point Michael. I would still advocate a transitional DOCTYPE, though, since the use of Wordpress’s default “strikethrough” button inserts the strike tag. In order to validate, it seems we should be using a transitional DOCTYPE for this.
And thanks for the link. I’ll check that out.
Thanks for the link Michael, it was mentioned on the article actually, but the URL was wrong.
I am no professional designer, but apparently even high profile designers are using the Transitional DOCTYPE, i.e., Chris Pearson.
I guess they could be forced to do so due to the Wordpress structure.
Heh - when writing the comment I almost thought of hitting my WP control panel and seeing what those buttons did. I must admit, I’ve never used them
In reality, I don’t think it matters much. For those people that do use the Wordpress buttons they’re probably not worried about validation all that much. Wordpress, and those that blog, have a keen knack for destroying validation as soon as a post is made.
For those that still use the buttons, but know what validation is, they are probably just like the rest of us and are hell-bent on learning everything all the time. Go out and learn more about XHTML/CSS and rewrite your posts and stylesheets in the frame of mind that you will validate and produce good semantic code.
Just wanted to clarify though: yes, I think WP should update and get with the times. There is a lot more WP could do on the backend processing (and the frontend, if those buttons do use outdated tags) to help the user out.
I have to admit I’ve not actually used Wordpress, but I can see where both sides of the argument lie.
I have written my own blog software and initially added a strict doctype to the template which was fine with content that I generated however if you start to embed things like YouTube videos, Google Adsense or Amazon affliliate code the whole thing fails validation so whats the point?
Why should I generate “perfect” code when no-one else can be bothered?!
wow I was a bit amused reading this post. I am a regular reader. I think Michael has already said what I wanted to say.
I use a Strict doctype yet my pages vaildate. This has nothing to do with wordpress but its they way you code. Making your website validate while maintaining a strict doctype is hard therefore people take the easy way out
Here is a quote from the W3C:
“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.”
Looks like the transitional doctypes are supported then, it is not lazyness from designers, but rather a choice for particular situations.
There are those who don’t care about validation and those who care a lot. There are also those in between. But for the general Wordpress user, as far as I’ve seen, they tend to be on the don’t-care side of the spectrum.
In other words, when creating themes for average users to make, Transitional may be the best way to go. It gives them more flexibility, and allows for certain things which Wordpress doesn’t (at the moment) care to update.
Even if the average Wordpress user “does not care” for validation I think we still should, and designers should as well.
That said, using a Transitional doctype, as I mentioned, does not seem to be “not caring” for proper validation. It is just another DOCTYPE, supported by the W3C, which suits better Wordpress.
@Ryan
Here’s another quote from the W3C, direct from the DTD about 5 lines below your quotes:
“Authors should use the Strict DTD unless they need the presentation control for user agents that don’t (adequately) support style sheets.”
How many bloggers actually have people viewing their page on clients without CSS support?
Michael, the quote was coming from me actually :).
I get your point, and agree with it, and I am all for respecting standards.
I just think that Transitional Doctypes are OK with Wordpress since the built-in code of WP has some tags that are not supported by the Strict format.
How do you explain top-notch designers using it after all?
http://www.theblogstudio.com/
http://www.designdisease.com/
http://www.pearsonified.com/
http://www.briangardner.com/
The thread on this post seems to have went dead awhile back but I just ran into it. Sure transitional doc types are fine that is why the W3c offers them as a validation option but I think you should seriously consider why you are using them. It seems to me that W3c offers transitional doc types for situations were you maybe “forced” to use certain types of mark ups because W3c understands not all browsers (especially for backwards compliance) support all CSS mark up. If you are using Transitional as a crutch than shame on you(Sorry). I just put on article on my blog about the importance of validating strict in terms of accessibility issues. Citing a lawsuit against Target in California regarding areas of their site that are not accessible. The day is coming were business will have to guarantee access to users with physical limitations. The best way to prepare for this is to make sure you use valid code.
Full disclosure though my blog was built awhile ago and is transitional but when I re-design early next year I will use the strict doc type.
Hi all!! Our links.
fucking hard free clip
fucking hard hardcore slut video
fucking hard hentai
fucking hard her
fucking hard her rough story
fucking hard her so
fucking hard horny pussy
fucking hard hot
fucking hard hot male movie
fucking hard hot porn
fucking hard hot teen
fucking hard housewife
fucking hard in man place public woman
fucking hard indian
fucking hard jennifer lopez
fucking hard kinky
fucking hard latina
fucking hard latinas
fucking hard lesbian
fucking hard licking sex
fucking hard links sex tgp
fucking hard machine
fucking hard machine sex
fucking hard man
fucking hard man picture woman
fucking hard man woman
fucking hard manga porn
fucking hard mature
fucking hard mature pussy
fucking hard mature woman
fucking hard milf
fucking hard milfs
fucking hard mouth
fucking hard movie
fucking hard movie porn star
fucking hard mpeg
fucking hard music video
fucking hard nurse
fucking hard nymphos
fucking hard on
fucking hard people
fucking hard pic
fucking hard picture
fucking hard porn
fucking hard porn star
fucking hard pounded so
fucking hard pussy
fucking hard pussy tight
fucking hard pussy video
fucking hard real
Map of site
Hi all! Click links.
fucking gay man man straight
fucking gay man married stud sucking
fucking gay man mature
fucking gay man mature old
fucking gay man military
fucking gay man movie
fucking gay man muscle
fucking gay man muscle video
fucking gay man muscular
fucking gay man muscular muscular sexy
fucking gay man muscular naked
fucking gay man naked
fucking gay man nude
fucking gay man old
fucking gay man old picture
fucking gay man old very
fucking gay man older
fucking gay man older video
fucking gay man outdoors
fucking gay man pet thir
fucking gay man photo
fucking gay man pic
fucking gay man pic post
fucking gay man picture
fucking gay man police
fucking gay man senior
fucking gay man sexy
fucking gay man straight
fucking gay man sucking
fucking gay man sucking video
fucking gay man trailer
fucking gay man video
fucking gay man wanking
fucking gay man young
fucking gay mare
fucking gay mature
fucking gay mexican
fucking gay midget
fucking gay military
fucking gay mouth
fucking gay mpg
fucking gay muscle
fucking gay muscular sexy
fucking gay niggas thug
fucking gay old
fucking gay orgy
fucking gay people
fucking gay photo
fucking gay photo sportsman
fucking gay pic shemale
Map of site
Evidently forums on this site are not moderated.