siva636
siva636

Reputation: 16451

What are the disadvantages of using transitional doctype?

I used to use the XHTML Strict Doctype, but I find it painful due to issues like opening a new window. (You have to use Javascript to do this and the target="_blank" is not supported in this doctype!!)

HTML5 do support (thanks for HTML5 specification) target="_blank" but I cannot expect full browser support now.

I am thinking of using Transitional Doctype and like to analyze what are the disadvantages of using transitional doctype.

Upvotes: 2

Views: 406

Answers (3)

Quentin
Quentin

Reputation: 944565

What are the disadvantages of using transitional doctype?

It includes a bunch of stuff that should generally be avoided. If you use Transitional then a validator won't complain when you use that stuff.

For example:

I find it painful due to issues like opening a new window.

New windows are annoying when foisted on users. Browsers provide some nice UIs for users to select when they want a new window (or tab), e.g. middle clicking on a link.

HTML5 do support (thanks for HTML5 specification) target="_blank"

Unfortunately so.

but I cannot expect full browser support now.

Browsers support the HTML 5 doctype just fine. It was picked to be backwards compatible. If a feature appears in an earlier version of HTML then browsers aren't going to stop supporting it just because the Doctype is different.

The main cost of HTML 5 is the lack of mature QA tools.

Upvotes: 2

Rich Bradshaw
Rich Bradshaw

Reputation: 73055

What browser support do you expect from using a doctype?

For new projects, there is no reason not to use the HTML5 doctype, even if you don't use any of the features. Otherwise, things like WAI-ARIA don't validate, not because they are bad, but because they were invented way after the old doctype.

Upvotes: 1

Rory McCrossan
Rory McCrossan

Reputation: 337743

The XHTML Transitional doctype was created to ease the transition from HTML3.2 to HTML4. XHTML Strict is what the full HTML4 standard specifies.

In terms of disavantages of Transitional, I don't believe there are any. There are no penalties in terms of SEO, nor browser rendering or accessibility.

So long as you are aware of the standard you are adhering to, and write good, clean, semantic code, use whichever doctype you like.

Upvotes: 1

Related Questions