DOCTYPE quandry

C

Charley Kyd

I've just discovered that the DOCTYPE needs to start every page of html. I
searched Google Groups and found links to several places that listed various
doctypes. But that doesn't help much.

When I copied possible versions into my home page, all but one of them
caused the size of my fonts to increase by about 20%. (I use CSS
throughout.) The one exception was this doctype:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

However, the following doctype, which is very similar, also increased the
size of my html by 20% or so:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">

Questions:
1. Why does the doctype specification change the size of my fonts?

2. Can anyone explain a practical way to figure out which doctype
specification is necessary?

3. Because all doctypes but one increase the size of my fonts, does that
mean that I will eventualy need to choose one of those doctypes and then
scale down my fonts?

I'm using tables, CSS, and no FrontPage-specific tools, like shared borders
or themes.

Thanks.

Charley
 
D

David Baxter

Actually, both of your examples are incomplete. They should read:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

Without the URL at the end, browsers will revert to "quirks" mode, which
means they will attempt to guess at an appropriate set or version of
"standards" and use that to render the page.

The version with the "transitional" is a "looser" version which will not
ignore certain so-called "deprecated" syntax. You might be surprised to
learn how many commonly used html expression are considered invalid in
the "strict" version.
 
J

Jens Peter Karlsen[FP MVP]

Read this:
http://www.hut.fi/~hsivonen/doctype.html

Basically it is so that modern browsers work in two modes "Quirks" and
"Standard" where the first works mostly as older browsers did while the
latter conforms more to the W3C recommendations. So when you insert a
valid doctype you need to start using valid code.

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.
 

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

Similar Threads

DocType 1
Force Character Encoding 9
XHTML 2
When I insert a doctype my home page loses its mind 1
doctype choice? 12
DOCTYPE 2
Why so many blank lines? 2
php 4

Top