Magic XHTML Quick Reference
The eXtensible HyperText Markup Language!
Elements Links Alphabetical Order
<a>
<b>
<c>
<d>
<e>
<f>
<h>
<i>
<k>
<l>
<m>
<n>
<o>
<p>
<q>
<s>
<t>
<u>
<v>
<!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">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!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">
XHTML Tags and Attributes
- <a>
- Used to anchor one document to another (i.e. hypertext link).
- Attributes: id, class, style, title, lang, xml:lang, dir, charset, type, name, href, hreflang, rel, rev, accesskey, shape, coords, tabindex, onfocus, onblur
- <abbr>
- Used to indicate an abbreviation.
- Attributes: id, class, style, title, lang, xml:lang, dir
- <acronym>
- Used to indicate an acronym.
- Attributes: id, class, style, title, lang, xml:lang, dir
- <address>
- Used to provide contact information about the author of the XHTML document.
- Attributes: id, class, style, title, lang, xml:lang, dir
- <applet>
- Used to include a Java applet in your web page. (Transitional DTD).
- Attributes: id, class, style, title, codebase, archive, code, object, alt, name, width, height, align, hspace, vspace
- <area>
- Used to define the area of a client-side image map.
- Attributes: id, class, style, title, lang, xml:lang, dir, shape, coords, href, nohref, alt (required),tabindex, accesskey, onfocus, onblur
- <b>
- Used to provide bold font.
- Attributes: id, class, style, title, lang, xml:lang, dir
- <base>
- This is the document's base URI.
(Part of the <head> element.)
- Attribute: href
- <basefont>
- Used to define the base (i.e. default) font size. (Transitional DTD).
- Attributes: id, size, color, face
- <bdo>
- Used to turn off the bi-directional rendering algorithm.
- Attributes: id, class, style, title, lang, xml:lang, dir (required), onclick,
ondblclick, onmousedown, onmouseup, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup
- <big>
- Used to provide bigger font.
- Attributes: id, class, style, title, lang, xml:lang, dir
- <blockquote>
- Used to delaminate a long quotation.
- Attributes: id, class, style, title, lang, xml:lang, dir, cite
- <body>
- The <body> element contains the document's displayed content.
- Attributes: id, class, style, title, lang, xml:lang, dir, onload, onunload
- <br />
- Used to provide forced line break - empty element.
- Attributes: id, class, style, title
- <button>
- Used to provide an XHTML button on your web page.
- Attributes: id, class, style, title, lang, xml:lang, dir, name, value, type, disabled, tabindex, accesskey, onfocus, onblur
- <caption>
- Used to provide the caption for a table.
- Attributes: id, class, style, title, lang, xml:lang, dir
- <center>
- Used to centre text on your web page (same as <div align="center">). (Transitional DTD).
- Attributes: id, class, style, title, lang, xml:lang, dir
- <cite>
- Used to indicate a citation (reference to other work).
- Attributes: id, class, style, title, lang, xml:lang, dir
- <code>
- Used to delimit program code.
- Attributes: id, class, style, title, lang, xml:lang, dir
- <col>
- Used to denote a table column.
- Attributes: id, class, style, title, lang, xml:lang, dir, span, width, char, charoff, align, valign
- <colgroup>
- Used to denote a table column group.
- Attributes: id, class, style, title, lang, xml:lang, dir, span, width, char, charoff, align,
valign
- <dd>
- Used to provide a definition of the <dd> in a <dl>.
- Attributes: id, class, style, title, lang, xml:lang, dir
- <del>
- Used to show the text that has been deleted in order to update a document.
- Attributes: id, class, style, title, lang, xml:lang, dir, cite, datetime
- <dfn>
- Used to delimit a definition.
- Attributes: id, class, style, title, lang, xml:lang, dir
- <dir>
- Used to define a listing of directories. (Transitional DTD).
- Attributes: id, class, style, title, lang, xml:lang, dir, compact
- <div>
- A generic language/style container.
- Attributes: id, class, style, title, lang, xml:lang, dir
- <dl>
- Used to define a definition list.
- Attributes: id, class, style, title, lang, xml:lang, dir
- <dt>
- Used within <dl> to define a definition term.
- Attributes: id, class, style, title, lang, xml:lang, dir
- <em>
- Used to proved emphasis.
- Attributes: id, class, style, title, lang, xml:lang, dir
- <fieldset>
- Used to group form fields.
- Attributes: id, class, style, title, lang, xml:lang, dir
- <font>
- Used to change the font size and colour. (Transitional DTD).
- Attributes: id, class, style, title, lang, xml:lang, dir, size, color, face
- <form>
- Used to generate an interactive form.
- Attributes: id, class, style, title, lang, xml:lang, dir, action (required), method, enctype, onsubmit, onreset, accept-charset
- <frame>
- Used to define a frame (or sub-window). (Frameset DTD).
- Attributes: id, class, style, title, longdesc, name, src, frameborder, marginwidth, marginheight, noresize, scrolling
- <frameset>
- Used to define a window subdivision. (Frameset DTD).
- Attributes: id, class, style, title, rows, cols, onload, onunload
- <h1>
- The largest of the six headings.
- Attributes: id, class, style, title, lang, xml:lang, dir
- <h2>
- The second largest of the six headings.
- Attributes: id, class, style, title, lang, xml:lang, dir
- <h3>
- The third largest of the six headings.
- Attributes: id, class, style, title, lang, xml:lang, dir
- <h4>
- The third smallest of the six headings.
- Attributes: id, class, style, title, lang, xml:lang, dir
- <h5>
- The second smallest of the six headings.
- Attributes: id, class, style, title, lang, xml:lang, dir
- <h6>
- The smallest of the six headings.
- Attributes: id, class, style, title, lang, xml:lang, dir
- <head>
- The <head> element contains a document's non-displayed meta-information.
- Attributes: lang, xml:lang, dir, profile
- <hr />
- Displays a horizontal rule - empty element.
- Attributes: id, class, style, title, lang, xml:lang, dir
- <html>
- The root element of each XHTML document (note it has no x).
- Attributes: lang, xml:lang, dir, xmlns (fixed, must be http://www.w3.org/1999/xhtml)
- <i>
- Used to provide italic font.
- Attributes: id, class, style, title, lang, xml:lang, dir
- <iframe>
- Used to create a sub-window within your web page. (Transitional DTD).
- Attributes: id, class, style, title, longdesc, name, src, frameborder, marginwidth, marginheight, scrolling, align, height, width
- <img>
- Used to include an image within the web page.
- Attributes: id, class, style, title, lang, xml:lang, dir, src (required), alt (required), longdesc, height, width, usemap, ismap
- <input>
- Used to specify a form's input control.
- Attributes: id, class, style, title, lang, xml:lang, dir, type, name, value, checked, disabled, readonly, size, maxlength, src, alt, usemap, tabindex, accesskey, onfocus, onblur, onselect, onchange, accept
- <ins>
- Used to show the text that has been inserted in order to update a document.
- Attributes: id, class, style, title, lang, xml:lang, dir, cite, datetime
- <isindex>
- Used to enter a word in a searchable index. (Transitional DTD).
- Attributes: id, class, style, title,
lang, xml:lang, dir, prompt
- <kbd>
- Used to indicate material that a user should enter at their keyboard.
- Attributes: id, class, style, title, lang, xml:lang, dir
- <label>
- Used to label a form field.
- Attributes: id, class, style, title, lang, xml:lang, dir, for, accesskey, onfocus, onblur
- <legend>
- Used to label a fieldset grouping.
- Attributes: id, class, style, title, lang, xml:lang, dir, accesskey
- <li>
- Used to define each item in your specified list (either <ol> or
<ul>).
- Attributes: id, class, style, title, lang, xml:lang, dir
- <link>
- A media-independent link. (Part of the <head> element).
- Attributes: id, class, style, title, lang, xml:lang, dir, charset, href, hreflang, type, rel,
rev, media
- <map>
- Used to specify a client-side image map.
- Attributes: lang, xml:lang, dir, id (required), class, style, title, name,
onclick, ondblclick, onmousedown, onmouseup, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup
- <menu>
- Used to define a menu list. (Transitional DTD).
- Attributes: id, class, style, title, lang, xml:lang, dir, compact
- <meta>
- Used to list generic meta-information. (Part of the <head> element).
- Attributes: lang, xml:lang, dir, http-equiv, name, content (required), scheme
- <noframes>
- Used to provide alternate content when frames are not available. (Transitional DTD).
- Attributes: id, class, style, title, lang, xml:lang, dir
- <noscript>
- Used to provide an alternate content when scripting is not available (Part of the <head> element).
- Attributes: id, class, style, title, lang, xml:lang, dir
- <object>
- Used to embed an object within your web page.
- Attributes: id, class, style, title,
lang, xml:lang, dir, declare, classid, codebase, data, type,
codetype, archive, standby, height, width, usemap, name,
tabindex
- <ol>
- Used to define an ordered (i.e. numbered) list.
- Attributes: id, class, style,
title, lang, xml:lang, dir
- <optgroup>
- Used to create a list of options.
- Attributes: id, class, style, title,
lang, xml:lang, dir, disabled, label (required)
- <option>
- Used to define each choice in a <select> list.
- Attributes: id, class, style, title,
lang, xml:lang, dir, selected, disabled, label, value
- <p>
- Used to begin a new paragraph.
- Attributes: id, class, style,
title, lang, xml:lang, dir
- <param>
- Used to supply a name property (e.g. within <object>).
- Attributes: id, name, value, valuetype, type
- <pre>
- Used to preserve spacing (i.e. preformatted text).
- Attributes: id, class, style, title,
lang, xml:lang, dir, xml:space
- <q>
- Used to indicate an in-line quote.
- Attributes: id, class, style, title,
lang, xml:lang, dir, cite
- <s>
- Used to provide strike-through text (same as <strike>). (Transitional DTD).
- Attributes: id, class, style,
title, lang, xml:lang, dir
- <samp>
- Used to delimit program and other sample output.
- Attributes: id, class, style,
title, lang, xml:lang, dir
- <script>
- Use to include script statements.
(Part of the <head> element.)
- Attributes: charset, type
(required), src, defer, xml:space
- <select>
- Used to provide a menu of options from which a user may select one
choice.
- Attributes: id, class, style, title,
lang, xml:lang, dir, name, size, multiple, disabled,
tabindex, onfocus, onblur, onchange
- <small>
- Used to provide smaller font.
- Attributes: id, class, style,
title, lang, xml:lang, dir
- <span>
- A generic language/style container.
- Attributes: id, class, style, title, lang, xml:lang, dir
- <strike>
- Used to provide strike-through text (same as <s>). (Transitional DTD).
- Attributes: id, class, style,
title, lang, xml:lang, dir
- <strong>
- Used to provide strong emphasis.
- Attributes: id, class, style,
title, lang, xml:lang, dir
- <style>
- Used to include style information.
(Part of the <head> element.)
- Attributes: lang, xml:lang,
dir, type (required), media, title, xml:space
- <sub>
- Used to provide subscripts.
- Attributes: id, class, style, title, lang, xml:lang, dir
- <sup>
- Used to provide superscripts.
- Attributes: id, class, style, title, lang, xml:lang, dir
- <table>
- Used to define a table.
- Attributes: id, class, style, title, lang, xml:lang, dir, summary, width, border,
frame, rules, cellspacing, cellpadding
- <tbody>
- Used to delimit the table body.
- Attributes: id, class, style, title, lang, xml:lang, dir, char, charoff, align, valign
- <td>
- Used to define a table data cell.
- Attributes: id, class, style, title, lang, xml:lang, dir, abbr, axis, headers, scope, rowspan, colspan, char, charoff, align, valign
- <textarea>
- Used to define a multi-line input text field.
- Attributes: id, class, style, title, lang, xml:lang, dir, name, rows (required),
cols (required), disabled, readonly, tabindex, accesskey, onfocus, onblur, onselect, onchange
- <tfoot>
- Used to define the table footer.
- Attributes: id, class, style, title, lang, xml:lang, dir, char, charoff, align, valign
- <th>
- Used to denote one of the header rows in a table.
- Attributes: id, class, style, title, lang, xml:lang, dir, abbr, axis, headers, scope, rowspan, colspan, char, charoff, align, valign
- <thead>
- Used to delimit the table head.
- Attributes: id, class, style, title,
lang, xml:lang, dir, char, charoff, align, valign
- <title>
- Used to define the document's title.
(Part of the <head> element.)
- Attributes: lang, xml:lang, dir
- <tr>
- Used to define a table row.
- Attributes: id, class, style, title, lang, xml:lang, dir, char, charoff, align, valign
- <tt>
- Used to provide a fixed width font (teletype).
- Attributes: id, class, style, title, lang, xml:lang, dir
- <u>
- Used to provide underlined text. (Transitional DTD).
- Attributes: id, class, style, title, lang, xml:lang, dir
- <ul>
- Used to define an unordered list.
- Attributes: id, class, style, title, lang, xml:lang, dir
- <var>
- Used to indicate a variable.
- Attributes: id, class, style, title, lang, xml:lang, dir