Forum Moderators: open

Message Too Old, No Replies

Which DOCTYPE to use

when creating a new website?

         

linton

8:13 am on Oct 11, 2005 (gmt 0)

10+ Year Member



Now the world is my oyster! I am starting from scratch and can use whatever DOCTYPE I choose to, but which one is the best?

I intend to use the W3C validator to ensure correct code but which DOCTYPE will show my website correctly in the majority of browsers?

Robin_reala

9:44 am on Oct 11, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you're starting from scratch I'd got for XHTML 1.0 Strict. There's plenty of arguments for using HTML 4.01 Strict but personally I prefer XHTML's coding style. The choice between the two is really up to you. Go Strict over Transitional because it'll help you be more rigorous in your coding.

linton

10:28 am on Oct 11, 2005 (gmt 0)

10+ Year Member



So currently, does HMTL 4.01 Strict show the intended layout of a website in more browsers than HTML 4.01 Transitional? Also, how about XHTML 1.0 Strict, what would be the disadvatgaes of this, eg. would people using Netscape 6 see it as intended?

Robin_reala

10:39 am on Oct 11, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Nothing will really fail badly regardless of doctype. What the doctype does is tell the browser which flavour of (X)HTML you're coding in. A strict doctype removes a lot of the presentational features of HTML that have been transferred over to CSS - this means that you're less likely to start using older features that will be removed in a future version.