Page 1 of 1

HTML 4.01 DOCTYPE!!!

Posted: Thu Oct 17, 2013 10:50 pm
by jessepit
I'm still learning HTML and was curious to know how you would type out <!DOCTYPE for HTML/HTML5? thanks cms consulting

Re: HTML 4.01 DOCTYPE!!!

Posted: Thu Oct 17, 2013 10:59 pm
by jvierra

Re: HTML 4.01 DOCTYPE!!!

Posted: Thu Oct 17, 2013 11:06 pm
by jvierra
In XHTML5 the DOCTYPE must be a case-sensitive match of the string "<!DOCTYPE html>". This is because in XHTML syntax all HTML PUBLIC are required to be in lower case, including the root element referenced inside the HTML5 DOCTYPE. As well, XHTML only accepts the upper case inside the DOCTYPE string. These rules are not defined by the HTML5 specification itself but by XML and the syntax rules for XHTML DTDs. For the XHTML5 syntax, then DTDs are permitted as well.

The DOCTYPE is optional in XHTML5 and may simply be omitted.[5] However, if the markup is to be processed as both XML and HTML, a DOCTYPE should be used.[6]

http://en.wikipedia.org/wiki/Document_type_declaration

Re: HTML 4.01 DOCTYPE!!!

Posted: Thu Oct 17, 2013 11:13 pm
by jvierra
To further complicate things we also have this comparison:
http://dev.w3.org/html5/html-author/#ht ... comparison