HTML-Lesson 16

Doctypes

Doctypes

Doctypes are fairly recent addition to web pages. They take the form of a tag placed before anything else on the page. DTD's for html 4.01 and xhtml 1.0 each exist in three forms. They are the strict, the transitional and the frameset. The DTD for XHTML 1.1 occurs only in a strict form.

html DTD's

Strict

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

Transitional

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

Frameset

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

xhtml DTD's

Strict

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

Transitional

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

Frameset

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

xhtml 1.1

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

More on xhtml

The opening tag of an xhtml document (after the DTD) should be:
<html xmlns="http://www.w3.org/1999/xhtml">

Previous Lesson previous lesson next lesson Next Lesson