tags:

views:

157

answers:

3

Is there a way that without DOCTYPE tag all css are working ?

A: 

Not really.

Browsers use the Doctype to determine if they should go into standards (aka strict) mode or quirks mode.

In quirks mode browsers are deliberately buggy so that they are compatible with bad CSS written for ancient, buggy browsers. The results are inconsistent.

It is essentially an intelligence test — is the author of the page smart enough to try to write to standards? If not, assume their CSS is just as bad.

The solution is to write good markup.

David Dorward
+2  A: 

If you don't have a proper doctype, the page will be rendered in quirks mode. CSS will still work, but it will work differently.

What quirks mode mean exactly differs a lot from browser to browser. It has a very big impact on Internet Explorer, as it even uses a different box model.

Guffa
A: 

You should always try to use a doctype. You don't want your webpages to run in quirks mode, really.

J. Vermeire