HTML Adding the Doctype


Example

The <!DOCTYPE> declaration should always be included at the top of the HTML document, before the <html> tag.

5

See HTML 5 Doctype for details on the HTML 5 Doctype.


<!DOCTYPE html>
4.01

See HTML 4.01 Doctypes for details on how these types differ from each other.


Strict

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.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.w3.org/TR/html4/frameset.dtd">