When writing XML and XHTML the markup language should not define how the resulting document will look. The markup language is in the document to define the content.
Defining Content - What Does That Mean?
Content is more than just text on a page. Most content has a function of some type. On HTML pages, the function of most text is as paragraphs within a larger document. However, for XML documents, there might be more specific functions.
For example, an address book written in XML would have tags to define the various parts of the address. Such as:
<address>
<name>Jennifer Kyrnin</name>
<street>123 Any Street</street>
<city>Anytown</city>, <state>Virginia</state>
<zip>12345</zip>
</address>
The tags used in the address book:
- <address>
- <name>
- <street>
- <city>
- <state>
- <zip>
are not HTML tags. They do nothing to the text other than describe the function of the content. I could use this XML document in many different places, I would just need to provide the style information so that I could print the address, display it on a Web page, or add it to my personal address book.
Functional HTML Tags
HTML is moving closer to XML. Tags that define the form or style of the HTML document are, in many cases, deprecated in favor of style sheets (CSS). But there are many tags already in HTML that serve in a more functional fashion than form.
- html - the primary tag on a page. It tells the user agent that this document is HTML.
- head - another basic tag. This does no formatting at all, just tells the browser that there is header information enclosed.
- title - this tag describes the text enclosed as the title. Browser convention is to display the title at the top of the browser window.
- body - this tag defines the body content for a Web page.
- address - this tells the browser that the enclosed text is an address.
- acronym - the enclosed text is an acronym, and you can include a title attribute to define the acronym. Some browsers display the title when you mouse over it.
- cite - indicates that the enclosed text is a citation.
- code - while this is usually displayed in mono-spaced font, all it is saying to the browser is that the enclosed text is programming code.
- del - an interesting tag, this tag indicates text that has been deleted from a document, and includes the deletion date and a URL for any explanations.
- dfn - the definition tag allows you to highlight text the first time you use it, and define it. Dictionary-type search engines might use this tag to create dynamic dictionaries.
- em - emphasis. One of the oldest descriptive tags, it normally displays in italics, but it is really meant to emphasize the enclosed text.
- ins - insert is the counterpart to the delete tag.
- kbd - similar to the code tag, the keyboard tag indicates text that should be typed in at a computer.
- q - the quotation tag is similar to the cite tag, but it also includes information about the source of the citation (in a cite attribute).
- samp - yet another computer related tag, this one defines sample code or text such as in a directions list.
- strong - the counterpart to the emphasis tag, strong denotes text that has a strong emphasis. It is usually displayed in bold, but it is up to the browser.
- var - the variable tag is for computer code to denote variables in the text, such as file names in a command.

