XSLT Workshop: Basic XHTML Crib Sheet

This is a small subset of XHTML elements and attributes. For a full reference, check out http://www.w3schools.com/xhtml/.

XHTML elements: Main document divisions

html xmlns="http://www.w3.org/1999/xhtml"
The root element for your document. This should always have the XHTML namespace in it.
head
Place for metadata, like the teiHeader.
body
Place for page content, like TEI text.

XHTML elements: Header elements

title
The document title (displayed in the browser caption bar).
link rel="stylesheet" type="text/css" href="style.css"
Links the document to a CSS stylesheet. All three of these attributes are required.
meta http-equiv="Content-Type" content="text/html; charset=UTF-8"
Metadata tag showing the MIME type and the character encoding. Include this, but don’t worry about it.

XHTML elements: Block elements

div
A division or section (much like in TEI).
h1, h2, … h6
Six levels of heading (higher numbers mean lower level or less important).
p
A paragraph, i.e. a block of flowed text.
blockquote
An indented block, suitable for a block quotation.
ul
An unordered list (i.e. a bulleted list).
ol
An ordered list (i.e. a numbered list).
li
A list item, inside either of the two list types above.

XHTML elements: Inline elements

span
An anonymous span of text (used for highlighting, identification, styling, etc.).
q
A short inline quotation. (I.e., surrounded by quotation marks.)
a href="http://www.tei-c.org"
An anchor or link tag (requires an href attribute if intended to be a link; requires an id attribute if intended to be a target).
em
Emphasized text (defaults to italics).
strong
Strongly emphasized text (defaults to bold).
code
Computer code.

XHTML attributes

id
Like an xml:id, uniquely identifies a particular occurence of an element. Any element may have one, but the value must be unique within the document.
title
Tooltip text which shows up when mousing over an element. Any displayed element may have this.
class
One or more classnames (separated by spaces). Classnames can be used to apply CSS styling to elements in an efficient manner. Any displayed element may use this.
href
The hypertext reference attribute’s value is the URI of the target of the link (when used on an a) or of the stylesheet to be used (when used on a link).