Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does HTML5 DOCTYPE affect how CSS3 effects are rendered?

Tags:

html

css

doctype

Is there any difference how the css3 effects (for example animation) are rendered if the doctype is defined as

<!DOCTYPE html> (html5)

or as let's say common

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

How do different doctypes affect css rendering (except running quirks mode that is know to render differently)?

Samples appreciated.

like image 759
easwee Avatar asked Jul 28 '11 11:07

easwee


1 Answers

There is almost no difference* between those two doctypes in terms of CSS rendering.

The choice of doctype only affects validation, and which "browser mode" is used out of "Quirks Mode", "Standards Mode" ("no quirks mode"), "Almost Standards Mode" ("limited quirks mode").

See: http://hsivonen.iki.fi/doctype/

So, XHTML 1.0 Transitional gives "Almost Standards Mode", whereas <!DOCTYPE html> gives "Standards Mode".

*One difference is a minor and easily fixable adjustment concerning tables. Another is the treatment of heading elements nested inside certain HTML5 elements.

like image 199
thirtydot Avatar answered Sep 20 '22 15:09

thirtydot