/    Sign up×
Community /Pin to ProfileBookmark

<!doctype….>

I was just curious about this tag and wanted to see what everyone uses and why.

Currently I use this:
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.0 Transitional//EN”>

Only because it appears when coldfusion creates new pages. To be perfectly honest, I’m not sure what it means and, judging from previous threads, if its still the one used.

I’m sure lots of you have insight on this and wouldn’t mind informing a fellow web programmer? ?

Havik

to post a comment
Full-stack Developer

2 Comments(s)

Copy linkTweet thisAlerts:
@AdamGundryApr 17.2003 — The code you posted is a Document Type Definition (Doctype, or DTD). This identifies your pages as HTML, and specifies which version to use when parsing them. The version you quoted is the doctype for HTML 4.0 Transitional, which is now technically superseded by HTML 4.01, though the differences are minor.

The three doctypes now commonly used are HTML 4.01 Strict, Transitional and Frameset. Strict forces conformance to the W3C standards, and is the best to use if your pages are 100% compliant. Transitional allows some now deprecated tags, for pages only newly adopting the HTML 4.01 standard. Frameset is used for documents containing frames (suprise suprise).

See this page for more information:

http://www.w3.org/TR/REC-html40/struct/global.html

Adam
Copy linkTweet thisAlerts:
@havikauthorApr 17.2003 — I see, so it's a good idea to change it over to 4.01 then? At first I was sceptical in using it but now it makes sense. Now I'll just have to convince my co-workers to program this way and we'll be set.

I tried to validate our site using W3C standards and theres lots to be done to make it compliant.

Havik
×

Success!

Help @havik spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.3,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...