XHTML ( Extensible HyperText Markup Language )

Understanding the basics of XHTML ( Extensible HyperText Markup Language ). Learn what XHTML is, what the different document types are and what an XHTML web document looks like so you can interpret the markup code.

If you understand these concepts, you may want to start with Understanding markup tags, elements and attributes.

What is XHTML ?

XHTML is a stricter and cleaner version of HTML a publishing language of the World Wide Web. XHTML combines the syntax rules of XML ( Extensible Markup Language ) with the markup of HTML. This combination of publishing languages produces well formed web documents that are accessible to a wide variety of web browsing software and devices.

What are the different XHTML document types ?

The <!DOCTYPE> Document Type Definition or DTD defines the .html document language type (e.g. XHTML 1.0 Strict ), defines the structure, attributes and elements that are to be used in the document. If the document is to be considered valid the structure, attributes and elements must comply with the <!DOCTYPE> Document Type Definition or DTD rules. The document types for XHTML are: Strict, Transitional, and Frameset.

XHTML 1.0 Strict


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

XHTML 1.0 Transitional


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

XHTML 1.0 Frameset


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

What does an XHTML web document look like ?

XHTML web document sample below. Note; meta and element tags are not included in this XHTML web document


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html  >
<head>
 <title></title>
 <link rel="stylesheet" href="style.css" type="text/css" media="screen" />
</head>
<body>

</body>
</html>


Continue with: Understanding markup tags, elements and attributes


Go back to: Top of page