Here are the doctype declarations for you. Short and sweet

HTML Doctypes:

HTML 5 Doctype

<!DOCTYPE html>

HTML 4.01 Strict Doctype

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

XHTML Doctypes:

XHTML 1.1 Doctype

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

XHTML 1.0 Transitional Doctype

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

XHTML 1.0 Strict Doctype

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

Read more here.

*Something to note – If you use TinyMCE it tries to produce XHTML compliant code, not HTML.  That being said, I’ve had it strip out “empty” tags and divs that wrapped around other divs because they were seen as empty.  A hack to fix this is putting a comment before (and possibly after the opening tag of the “empty” element.

<!-- -->
<div id="shortyWannaLickTheWrapper">
<!-- -->
    <div>
         <p>Shorty</p>
    </div>
    <div>
         <p>Candy of some sort</p>
    </div>
</div>

LEAVE A REPLY

Please enter your comment!
Please enter your name here