Possible Duplicate:
What are the different doctypes in html and what do they mean?
Being fairly inexperienced with certain aspects of web development (I've always concentrated more on the back-end than the front), can anyone give me their thoughts on whether I should worry about the DOCTYPE declaration made at the beginning of web pages?
Is the most common HTML 4.01 and should I build my web apps to conform to this standard?
The HTML document type declaration, also known as DOCTYPE , is the first line of code required in every HTML or XHTML document. The DOCTYPE declaration is an instruction to the web browser about what version of HTML the page is written in. This ensures that the web page is parsed the same way by different web browsers.
HTML 4 Strict is a trimmed down version of HTML 4 that emphasizes structure over presentation. Deprecated elements and attributes (including most presentational attributes), frames, and link targets are not allowed in HTML 4 Strict.
The HTML 4 document type declaration starts off with <! doctype html public , followed information on the HTML specification that the document conforms to. HTML 4.01 has 3 possible doctypes: HTML 4 Strict, HTML 4 Transitional, and HTML 4 Frameset. Every HTML 4 document you create should have one of these three DTDs.
To confirm if a webpage is HTML5 or 4.01, check the doctype at the very top of the webpage in source code view.
John Resig (jQuery) has a say in that matter. Additionally, a DocType helps make MSIE6 use the right box model, and it also eases the pain of validating your site (this is a good thing for development; think of it as debugging).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With