DOCTYPE | WebReference


HTML 4.01 Element Reference

By Lee Underwood

Return to HTML 4.01 element index page

Name: Document Type Definition


Description: Tells the browser what version of HTML is being used.

Browser Compatibility: NN: 1.0+ / IE: 2.0+ / Opera: 4+

  • None

Code Example:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"

Comments: Should be the first line in the HTML document. Failure to use the element may result in validation errors and page display problems.

XHTML Notes: The DOCTYPE element must appear in the upper/lowercase letters shown here, even in XHTML.

Created: March 15, 2005