XHTML Page Structure

Valid XHTML Syntax

A Valid XTHML Web Page

Download the XHTML Template (right-click to download)

XHTML Page Structure

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
<title>XHTML Template</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Style-Type" content="text/css" />

</head>

The Document Type Definition (DTD)

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

Reasons to use a DTD

XHTML Namespace

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

Content-Type Meta

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

Content-Type indicates the type of media contained in the file.

Content-Style-Type Meta

<meta http-equiv="Content-Style-Type" content="text/css" />

Content-Style-ype indicates the type of presentation used by the file.

Resources