HTML and CSS Reference
In-Depth Information
You can see the general syntax of the HTML document type declaration in Listing 3-34. Note that HTML5 has a
simplified DOCTYPE , as you will see.
Listing 3-34. General Syntax of Document Type Declaration
<!DOCTYPE root-element PUBLIC "FPI"
SYSTEM "URI"
>
The root element is html since it is the element opened first and closed last in HTML files (see “Core Structure
Elements”).
The various versions of HTML use similar syntax (except HTML5):
HTML 2.0 (historical, not used anymore)
<!DOCTYPE html PUBLIC "-//IETF//DTD HTML 2.0//EN">
HTML 3.2 (historical, not used anymore)
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
HTML 4.0 Transitional (should not be used)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
" http://www.w3.org/TR/REC-html40/loose.dtd ">
HTML 4.0 Frameset (obsolete, should not be used)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN"
"-//W3C//DTD HTML 4.0 Frameset//EN">
HTML 4.0 Strict
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
" http://www.w3.org/TR/REC-html40/strict.dtd ">
HTML 4.01 Transitional (should not be used)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
" http://www.w3.org/TR/html4/loose.dtd ">
HTML 4.01 Frameset (obsolete, should not be used)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
" http://www.w3.org/TR/html4/frameset.dtd ">
HTML 4.01 Strict
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
" http://www.w3.org/TR/html4/strict.dtd ">
HTML 4.01+RDFa
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01+RDFa 1.1//EN"
" http://www.w3.org/MarkUp/DTD/html401-rdfa11-1.dtd ">
 
Search WWH ::




Custom Search