HTML and CSS Reference
In-Depth Information
namespaces exist and that you will need to manage them if you choose
to embed content based on one DTD within content defined by another
DTD.
16.2.3. A Minimal XHTML Document
As a courtesy to all fledgling XHTML authors, we now present the min-
imal and correct XHTML document, including all the appropriate XML,
XHTML, and namespace declarations. With this most difficult part out of
the way, you need only supply content to create a complete XHTML doc-
ument:
<?xml version="1.0" encoding="UTF-8"?>
<!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/TR/xhtml1" xml:lang="en" lang="en">
<head>
<title>Every document must have a title</title>
</head>
<body>
...your content goes here... </body>
</html>
Working through the minimal document one element at a time, we begin
by declaring that we are basing the document on the XML 1.0 standard
and using 8-bit Unicode characters to express its contents and markup.
We then announce, in the familiar HTML-like <!DOCTYPE> statement, that
we are following the markup rules defined in the transitional XHTML 1.0
DTD, which allow us free rein to use nearly any HTML 4.01 element in
our document.
Our document content actually begins with the <html> tag, which has
its xmlns attribute declare that the XHTML namespace is the default
namespace for the entire document. Also note the lang attribute, in both
 
Search WWH ::




Custom Search