The DOCTYPE describes to the Web browser displaying the page which set of rules to use when parsing (reading and displaying) the page.
So using one set of rules will display one way. Using a different set of rules means the page will display some other way.
More info here: http://www.w3schools.com/tags/tag_doctype.asp
Best wishes,
Eye for Video www.cidigitalmedia.com
To put a finer point on this issue, the <!DOCTYPE> is particularly important to web designers because using a complete <!DOCTYPE> statement sets browsers to Standards Compliance Mode in which they are all at least *trying* to render pages according to the W3C Standards. Using an incomplete <!DOCTYPE> or omitting it entirely, leaves browsers in what's called "Quirks Mode" in which they render pages with their own methods - each of which is different to one degree or another. Simply put, if your page relies on anything more sophisticated than <table>s and <font> tags, a complete <!DOCTYPE> is vital for cross-browser compatibility.
Your example "<!doctype>" is invalid and does nothing. Browsers will use Quirks Mode if you use that. Use a complete <!DOCTYPE> that includes the document type and a URL so that the browser will use Standards Compliance Mode. For example:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
No, that's not true.
The <!doctype> declaration will enforce all browsers to go into standards HTML mode. Same as with the script tag which will always default to its native "JavaScript" language not some other random or unconventional programming language if not declared.
Only the most recent FX edition seems to have introduced a bug, which makes it complain. But they seem to have forgotten that the default browser language (and the reason they exist) is was and always will be: HTML code interpretation.
Anyway until FX reverts to complying with the convention they always complied to, going with <!DOCTYPE html> declaration will do you no harm.
It mostly needs tweaks for IE(surprise) but I think it's doable. You still need to learn were to put stuff as some of the tag aren't as straight forward as you think they should be. <section>, <aside>, <header>, and <footer> are good examples of tags that have flexibility. I would definitely read up on it to help sort it out. I'm going through a book on it and making a mock up from what I learn. There is also a number of technologies that are getting lumped into HTML 5 as well. The Missing Manual series has a HTML 5 book that covers the topics and it's the one I'm going through.
Here's the basics of code to make it more cross browser friendly. I might add I could see adding the <video> and <audio> tags as block level display as well.
Put into <head> as IE doesn't even recognize the HTML 5 tags and this counters it.
Bookmarks