Which doctype do I use?

J

Jim Scott

How do I know which doctype to use?
I use HTML 4.01 Transitional - dunno why - it just sort of happened.
Is it right or wrong and how would I know?
I have looked at various sites inc. W3C, but they don't make it clearer to
me.
 
J

Jonathan N. Little

Jim said:
How do I know which doctype to use?
I use HTML 4.01 Transitional - dunno why - it just sort of happened.
Is it right or wrong and how would I know?
I have looked at various sites inc. W3C, but they don't make it clearer to
me.
Look at your code, check the specs, especially what is deprecated and
obsolete

http://www.w3.org/TR/html4/appendix/changes.html#h-A.3.1.2

If your do not have a real reason to do otherwise make your code HTML
4.01 strict, validate it to flag and fix errors.

http://validator.w3.org/
 
J

jb

How do I know which doctype to use?
I use HTML 4.01 Transitional - dunno why - it just sort of happened.
Is it right or wrong and how would I know?
I have looked at various sites inc. W3C, but they don't make it clearer to
me.


If you want to look good, use a more recent doctype.
 
T

Toby Inkster

Jim said:
Which doctype do I use?
I use HTML 4.01 Transitional

You answered your own question!

Which doctype should you use? That's a matter for debate. HTML 4.0 Strict,
HTML 4.01 Strict, XHTML 1.0 Strict, XHTML 1.1 and ISO/IEC 15445:2000(E)
are five good answers.
 
J

Jim Scott

You answered your own question!

Which doctype should you use? That's a matter for debate. HTML 4.0 Strict,
HTML 4.01 Strict, XHTML 1.0 Strict, XHTML 1.1 and ISO/IEC 15445:2000(E)
are five good answers.

Ha!
Alright, the question should have been "which do you advise me to use".
Your answer seems to be any one which is 'strict' rather than not.
 
A

Alan J. Flavell

If you want to look good, use a more recent doctype.

XHTML/1.0 Transitional is "more recent" than HTML/4.01 Strict, but,
far from making someone look "good", some of us think it makes them
look silly.

XHTML/1.0 Transitional could be regarded as a proof of concept by the W3C.
Whether "they" (the collective "they") ever expected anyone to seriously
use it for authoring, is, I'd suggest, an open question.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,135
Latest member
VeronaShap
Top