Forum Moderators: open

Message Too Old, No Replies

How do I know which <!DOCTYPE> tag to use ?

I need help :(

         

diddlydazz

10:55 pm on Jan 7, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



How do I know which <!DOCTYPE> tag to use ?

all info appreciated as always :)

thanks in advance

Dazz

JamesR

10:58 pm on Jan 7, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It isn't totally necessary but it depends on how you code your pages and under what HTML standard you want the code to validate. Most use HTML 4 transitional. You can find more about it here:

[htmlhelp.com...]

diddlydazz

11:08 pm on Jan 7, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Cheers james

So it's not necessary then?

Dazz

Xoc

12:51 am on Jan 8, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Most browsers will take whatever they can make sense of if there is no <!DOCTYPE>. However, IE 6 looks at the DOCTYPE and decides which version of HTML you are using. I would suggest HTML 4 transitional or XHTML 1.0 transitional.

papabaer

3:55 am on Jan 8, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Setting the <!DOCTYPE> of a html document does make a big difference in rendering when using IE6 - For instance if the following is included
<!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">

as the doctype, then IE6 will adhere to W3C Standards when rendering CSS (beware the BOX MODEL!).

If there is no doctype included then IE6 will default to the IE5.5 rendering engine (which does NOT interpret the CSS Box Model correctly).

I code following XHTML 1.0 Transitional and I use IE6 as one of my test browsers. To see how the page renders with the IE5.5 engine, I just remove the doctype and then display the page. After I am satisfied with the results, I paste the doctype back into place....

XHTML & CSS (CSS-P Look Ma! No tables!)

diddlydazz

6:42 am on Jan 8, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Cheers for the info guys / gals.

The site is was considering doesn't have CSS (until I get round to learning it) :) so i presume it won't hurt not to have it :)

By the way, what are the advantages of CSS are they worth the effort of putting down my perl book ?

Dazz

tedster

8:51 am on Jan 8, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Dazz, that's a question that's had several threads of it's own. Some strong opinions fly about, mostly because solid browser support for CSS has been very slow in coming. Check the site search to wade into all the issues!

diddlydazz

8:55 am on Jan 8, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



will do tedster.