467,915 Members | 1,200 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,915 developers. It's quick & easy.

which document type

After changing some "old" web pages into CSS I noticed big differences
between mozilla and IE rendering. I finally noticed that the document type
was HTML 3.2.
I copied a more recent tag from another page which had 4.01 transitional.
The Mozilla and IE were then the same , although percentages seem to be less
than the figure given.
I see on web pages about CSS2 " document type HTML 4.0 transitional" or
sometimes HTML 4.01.
What shopuld the document type be. And what differences come about from
changing it.?
Jul 20 '05 #1
  • viewed: 1949
2 Replies
"Colin McGarry" <WE**********@cpmac.com> wrote:
What shopuld the document type be.
If you are authoring new documents according to HTML and CSS
specifications, use HTML 4.01 Strict doctype (irrespectively what the
actual document type is - nobody cares, except validators, and you can
use "doctype override" if needed).

You might wish to occasionally check the effect of removing the doctype,
since this (roughly) shows how IE 5.x (which is still used by many)
displays the page. If it looks ugly, don't care. If it is unreadable, you
might consider doing something about it, probably simplifying your CSS
And what differences come about from changing it.?

They won't tell us. It has even been proclaimed that the effects of
doctype sniffing must remain undocumented.

Yucca, http://www.cs.tut.fi/~jkorpela/
Jul 20 '05 #2
Colin McGarry wrote:
What shopuld the document type be. And what differences come about from
changing it.?

Brief guide to important HTML versions.

3.2 - attempt to describe the state of browser support some years ago.
4.01 - attempt to get HTML in to reasonable shape. There are three varients:
4.01 Frameset - for <frameset> documents (which should be avoided under
most circumstances)
4.01 Transitional - The version with most of the old presentational markup
4.01 Strict - The version without most of the old the OPM
XHTML 1.0 - exactly the same as HTML 4.01 but expressed using XML instead of

HTML 4.01 Strict probably the best choice for new documents at present.

List of DTDs: http://www.w3.org/QA/2002/04/valid-dtd-list.html

The Doctype shouldn't have any influence over the rendering of pages, but
some browsers use it to guess how smart the author is. "This page has THIS
Doctype therefore the author knows about standards" Vs "This page has THAT
or NO Doctype there therefore I will emulate old buggy browsers".


David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Bill_W_Stephens | last post: by
4 posts views Thread by Thomas Eichner | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.