• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 5. Extreme XHTML > Anatomy of an XHTML Document

Anatomy of an XHTML Document

The W3C has made learning XHTML easy for HTML authors. XHTML looks like HTML, but it's neater and has a few more mandatory tags thrown in due to its XML heritage. Let's first look at a minimal XHTML document, and then we'll break down the most important parts:

<?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>A Minimal XHTML Document</title>
</head>
<body>
    <p>Hello <a href="http://world.org/">World.org</a>.</p>
    <hr />
</body>
</html>


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint