HTML Doctype for Web Design
Your choice of HTML document will be one of the first decisions you’ll make when designing a website.
It will depend on a number of different factors, such as the intended audience and the objects and layout of your site. How to choose the right document type for your website is a frequently asked question, and can’t be reduced to a simple answer. However here are few document types depending on your web design situation and requirements.
Firstly it’s worth noting that all of the following document types are intended for the most recent version of HTML in use: HTML 4.01. As you may or may not be aware the doctype is always placed on the first line with nothing whatsoever preceding it to ensure that browsers (particularly Internet Explorer) pick the appropriate rendering mode. Using a doctype also makes it much easier to check your page for errors and standards compliance.
The three document types detailed are Transitional (Full), Transitional (Half), and Strict.
The HTML 4.01 Transitional (Full) doctype is probably the most balanced, ‘all-round’ choice. It’s the best choice if your site contains a mixture of old and new features such as older presentational markup alongside placing images in tables. If you remain unsure which document type to use then Transitional (Full) is probably your safest bet when building a site, as it triggers standards compliance mode in modern browsers (almost standards mode in Firefox).
If for whatever reason you need your site to display correctly on older browsers you’ll need to use the Transitional (Half) document type. This will result in the quirks rendering mode being used to display the website in modern browsers.
The Transitional (Half) doctype is the best doctype to choose if you are converting an older web page and do not want to rewrite the entire page from the ground up. It is also worth noting that CSS will not work correctly with this document type, so unless you have an old site you want to keep it would be advisable to choose one of the other two doctypes.
Pippa Young
For more information please visit Web Design Northampton