tags:

views:

96

answers:

4

I am using

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd"&gt;

in my web pages.

I remember reading in one of those XHTML vs HTML questions that one of the (small) advantages of using HTML is, a shorter DOCTYPE like

<!DOCTYPE html>

Can I use some shorter version like that and specify HTML 4.01 Strict?

If I simply use the short version, what will it be taken as? - Strict, Transitional?

+7  A: 

Nope, if there were a shorter version we would all be using it. :) The short type you are referring to is HTML 5.

Pekka
Oh! Isn't there no strict, frameset or transitional versions in HTML 5?
Senthil
Nope. HTML 5 does away with that complexity. Of course it's also not truly a finished spec at the moment, so maybe if we're unlucky we'll get those in the future.
ShZ
HTML5 doesn't specify DTD or any other form of validation as part of the spec. What conformance checkers exist (and as ShZ said, we're far from having a locked-down language at this point) are unofficial ad-hoc analysis tools. As such the phrase “valid HTML5” may be essentially meaningless.
bobince
bobince: that's just FUD. HTML5 explicitly defines conformance criteria for conformance checkers / validators. See http://www.whatwg.org/html5/#conformance-checkers . validator.nu and validator.w3.org are excellent tools already.
Ms2ger
A: 

If you want your HTML to be validated you will at least need to specify an (url to) a DTD...

I think you maybe could leave out the public name, maybe be changing the keyword PUBLIC to SYSTEM. But i'm not quite sure about this...

EDIT: Why is this voted down?? The question was for HTML 4, not for 5...

Nicky De Maeyer
So, even in HTML 5, for it to be validated by tools such as W3 validator, it needs to have a DTD url?
Senthil
senthil: Nope. HTML5 isn't that insane.
Ms2ger
+1  A: 

Nope. I'm afraid that's the only way to specify using HTML 4.01 Strict.

Daniel May
+1  A: 

Don't think there's a shorter way of specifying a HTML 4.0 Strict Doctype, which is a pretty specific document type. The doctype you gave would be valid for HTML 5, which may well be a good choice for a new site anyway.

David Heggie