Wich DOCTYPE is better?

gabi

New Member
Hello!

Can you tell me, from your expirience, wich doctype is better: HTML Transitonal or Strict, or XHTML Transitonal or Strict?

Thanks!
 

PixelPusher

Super Moderator
Staff member
It really depends on what you are doing with your site. Are you revamping? staring from scratch?

If you are starting from scratch then my first choice would be the HTML5 doctype that Phreadde mentioned. If you prefer HTML4, then I would use the Strict doctype.

If you are building upon an existing site and it may contain deprecated tags (that you don't or can't go back and rebuild) then Transitional would be the better choice.

XHTML refers to the method in which HTML tags are written. All tags must be closed, self-closing tags are permitted where applicable.

Ask Google: "what is doctype"...
http://www.w3schools.com/tags/tag_doctype.asp
http://en.wikipedia.org/wiki/Document_Type_Declaration
 

gabi

New Member
Thanks!

so I should use this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

because I am starting from scratch, like you said John.
Another "silly" question? Is there a difference in sites appearance betwenn strict and transitional?
Sorry, I am a beginer!
 

ronaldroe

Super Moderator
Staff member
The only difference between strict and transitional is what shenanigans it will let you get away with. The correct DOCTYPE for HTML 5 is what Phreadee posted above. None of the DTD crap is required.

I would suggest using HTML 5 for a new site. If you do, however, be sure to use the HTML5 shim.
 

jumpingspider

New Member
The only difference between strict and transitional is what shenanigans it will let you get away with. The correct DOCTYPE for HTML 5 is what Phreadee posted above. None of the DTD crap is required.

I would suggest using HTML 5 for a new site. If you do, however, be sure to use the HTML5 shim.

Very well said Ronald! I'd also suggest the HTML 5,if you're starting from nothing.
 

krymson

Member
yeah im starting to get good with HTML5 so its what im making standard i would suggest you do it too
 
Top