Create and Validate an XHTML 1.0 Document
W3C has morphed HTML into XHTML, but they still splash around in the same gene pool.
XHTML 1.0, a reformulation of HTML, appeared in 2000 as a W3C recommendation (http://www.w3.org/TR/xhtml1/). The simple difference between HTML and XHTML is that the tags in an HTML document are based on an SGML DTD, but the tags in an XHTML document are based on an XML DTD, and, as such, XHTML is an XML vocabulary.
An XHTML document must be well-formed XML, and may be validated against one of three official DTDs: transitional (http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd), strict (http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd), and frameset (http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd). The transitional DTD permits some older HTML elements that have been eliminated in the strict DTD. The frameset DTD has elements for creating frames.
Here is an example of a strict XHTML document (Example 4-4).
Example 4-4. time.html
<?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"> <head> <title>Time</title> </head> <body style="font-family:sans-serif"> <h1>Time</h1> <table style="font-size:14pt" cellpadding="10"> <tbody align="center"> <tr> <th>Timezone</th> <th>Hour</th> <th>Minute</th> <th>Second</th> <th>Meridiem</th> <th>Atomic</th> </tr> <tr> <td>PST</td> <td>11</td> <td>59</td> <td>59</td> <td>p.m.</td> ...