XHTML Tutorial: Standards-Based Web Design

by Paul Bohman

XHTML Elements (Tags)

The two table below shows most of the main elements that are used commonly in XHTML. Use these tables as a reference as you create your web content.

Table of elements
Type of Element Opening Closing Block or Inline
An HTML document <html> </html> not applicable
The "head" of an HTML document (this is where you put the title and other "meta" information) <head> </head> not applicable
Title (the "name" of your web page) <title> </title> not applicable
The body (visible portion) of an HTML document <body> </body> not applicable
Paragraph <p> </p> block
Heading level 1 <h1> </h1> block
Heading level 2 <h2> </h2> block
Heading level 3 <h3> </h3> block
Heading level 4 <h4> </h4> block
Heading level 5 <h5> </h5> block
Heading level 6 <h6> </h6> block
Unordered list (bulleted list) <ul> </ul> block
Ordered list (numbered list) <ol> </ol> block
List items (the text of a single item in either a bulleted or numbered list) <li> </li> block
Definition list <dl> </dl> block
Definition list: term <dt> </dt> block
Definition list: definition <dd> </dd> block
Blockquote (a chunk of text quoting somebody else) <blockquote> </blockquote> block
Table <table> </table> block
Table row <tr> </tr> block
Table data cell <td> </td> block
Table header cell <th> </th> block
Div (a generic, block-level section of a page) <div> </div> block
Iframe <iframe> </iframe> block
Span (a generic inline-level section of text) <span> </span> inline
Strong emphasis (for important text; this is rendered as bold in browsers) <strong> </strong> inline
Emphasis (this is rendered as italic in browsers) <em> </em> inline
Anchor or Link (used to create links or link destinations) <a> </a> inline
Superscript <sup> </sup> inline
Subscript </sub> </sub> inline
Form <form> </form> block
Form: inputs (text, checkbox, radio buttons, submit buttons) <input> </input> inline
Form: text area (for entering multiple lines of text <textarea> <textarea> inline
Form: select (drop-down lists, or multiple-select lists) <select> </select> inline

 

Self-Closing Elements
Type of Element Opening (and Closing)
Meta <meta />
Image <img />
Line Break (go to a new line, but stay in the same paragraph) <br />
Horizontal "rule" (a horizontal line separating sections of a document) <hr />

Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 License.