XHTML Defines

How to XHTML defines?
XHTML document defines in top of the document using <!DOCTYPE> specification.
As per specification we can identifies that the document is an XHTML.

Document Type Definitions (DTD)

  • HTML <!doctype> refer to the document type declaration use to specifying which version of HTML the document is using.

  • HTML <!doctype> declaration is not an HTML tag. It's a information about which version of the markup language the page is written.

  • Following doctypes are recommended in W3C specification.

HTML 5

<!DOCTYPE html>

This declaration needs to be the first in your HTML document.

<!DOCTYPE html>
<head>
  ...
  ...
</head>
<body>
  ...
  ...
</body>
</html>

Following are other DOCTYPES that are used on older version. Document type definitions is a define the XHTML type of document is Transitional, Strict, and Frameset.

HTML 4.01 Strict

All HTML tag and attributes are allow to supported document type.It's not allow to frame set and presentational.

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

HTML 4.01 Frameset

HTML 4.01 Transitional allows to use frameset.

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

HTML 4.01 Transitional

HTML 4.01 Transitional allow to use presentational.

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