January 2003
Beginner to intermediate
1200 pages
23h 42m
English
Because XHTML documents are actually XML, they support XML comments, which you can use to annotate your document. These annotations will not be displayed by the browser. XHTML comments are supported in XHTML 1.0 Strict, XHTML 1.0 Transitional, XHTML 1.0 Frameset, and XHTML 1.1. Comments have no attributes.
We're familiar with comments from XML; you enclose the text in a comment like this: <!--This page was last updated July 3.-->. Using comments, you can describe to readers what's going on in your document.
Here's how I might add comments to an XHTML document:
<?xml version="1.0"?> <!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" ...