Re: <!DOCTYPE> tag

by "Donna M Smillie" <dms(at)zetnet.co.uk>

 Date:  Mon, 20 Dec 1999 23:16:33 -0000
 To:  "MC B" <mc_b2(at)hotmail.com>,
<hwg-basics(at)hwg.org>
 References:  hotmail
  todo: View Thread, Original
Hi Cris

----- Original Message -----
From: MC B <mc_b2(at)hotmail.com>

> I want to write code which validates, and I know that the kind of
<!DOCTYPE>
> I insert makes the difference...
>
> Now my questions:
>
> 1 -  I have seen pages whose <!DOCTYPE> contain a URL, like
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0  Transitional//EN"
> "http://www.w3.org/TR/REC-html40/loose.dtd"> (from HWG home page)
>
> AND other pages where no URL is specified, like
>
> <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
>
> Are they both correct?

Can't help much with this one - I always use the DTDs (Document Type
Definitions) suggested by the W3C (ie the first one you list here).  As far
as I know, there are many "correct" DTDs.  My suggestion would be that
unless you have a specific reason to use something else, you'd be best
sticking with the DTDs suggested in the HTML 4.0 spec
(http://www.w3.org/TR/REC-html40).

> 2 - I know there are 3 "kinds" of spec: loose, transitional, strict.
>   How do I choose amongst them?

In fact "loose" and "transitional" are one and the same.  If you choose to
code in HTML 4.0, the latest version of HTML (although 4.01 looks to be
close to being issued), there are three "flavours" available -- Strict,
Transitional and Frameset, each with its own doctype.

If you create a website using frames, then any frameset documents should
use the Frameset DTD.

For pages that don't consist of a frameset, you can use the HTML 4.0 Strict
DTD if you only use HTML that describes the *structure* of the data and
don't include any presentational markup or only use CSS for presentation.
Or, if you want to use HTML that relates to the presentation of the data
(eg FONT tags, alignment attributes, etc - anything that is "deprecated" in
the HTML 4.0 spec), you should use the HTML 4.0 Transitional (also called
"loose") DTD.

Hope that clarifies it a bit?

Regards,
Donna
--
dms(at)zetnet.co.uk
Different Worlds:  http://www.users.zetnet.co.uk/dms/
Pictures of the Past, The Leslie Smith Family,
An Introduction to HTML, Copyright Considerations
Calendar Wallpapers, Online Bookshop

HTML: hwg-basics mailing list archives, maintained by Webmasters @ IWA