What's the best type?

It used to be the case that documents with doctrines received a standard regime, documents without doctrines acquired a regime of fads. But it seems like there are several near-standard modes these days , different browsers follow different rules, etc.

What's the best doctype to use in HTML? Is there any reason not to use the simplest version of <! DOCTYPE html>? Most of the documents do not follow any particular DTD anyway.

+2


source to share


2 answers


In the future and in the future, I will recommend HTML5 Doctype .

<!DOCTYPE HTML>
      

In practice, HTML validators pay much more attention to the dokeptic page type than browsers.



UPDATE: For those commenters asking the question directly above, here is my source for this statement: Webkit blog . It says:

... be careful, the validator looks at your doctype instead of the MIME type, unlike browsers.

Also, FWIW, the Webkit folks recommendation in the aforementioned linked blog is to use the HTML 4.01 transient doctype, which is used with mime-type text / html and validated as HTML, not XHTML.

+7


source


Which is the easiest one for the page you are creating?

You have to specify what type of web page you represent, so if you are using tables for layouts, then HTML 3.1 using CSS, then HTML 4.01.



If you are going to use some new features in HTML5 use this one.

Basically, be specific about what you are doing to help the browser display your page in the best possible way.

+1


source







All Articles