HTML and CSS Reference
In-Depth Information
Listing 3-3. An Element Deprecated a Long Time Ago Is Still Used in XHTML 1.0 Transitional Documents
<center>
<p>
A paragraph aligned to center.
</p>
</center>
Listing 3-4. The Code of Listing 3-3 Written in XHTML 1.0 Strict and Styled by CSS
.center {
text-align: center;
}
<p class="center">
A paragraph aligned to center.
<p>
XHTML 1.0 also has a Frameset variant, although, as we saw earlier, framesets should not be used anymore.
Listing 3-5 presents an XHTML 1.0 Strict skeleton document.
Listing 3-5. An XHTML 1.0 Strict Skeleton Document
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
" http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd " >
<html xmlns=" http://www.w3.org/1999/xhtml " xml:lang="en" lang="en">
<head>
<title>Minimal XHTML 1.0 Document</title>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
</head>
<body>
<p>
This is a minimal XHTML 1.0 document.
</p>
</body>
</html
The XHTML 1.0 Strict skeleton document is the best starting point for any kind of XHTML documents, because
this document type contains fundamental markup elements only that have been derived from HTML and are still current
in most markup languages. This markup can also be extended using external vocabularies (which changes the document
type to a mixed-namespace document type). If you update XHTML 1.0 Strict documents to HTML5, minimal changes are
needed (such as removing the DTD and using new elements).
Tip
 
 
Search WWH ::




Custom Search