How This Chapter Is Organized
Because of the vast coverage of this chapter, the information presented has been carefully structured to make it as easy as possible for you to look up the elements you need. At the highest level, this chapter is organized into major sections that cover a group of related elements. The major sections and the elements they cover include
Document structure elements: <html>, <head>, <base>, <meta>, <link>, <script>, <noscript>, <style>, <title>, and <body>
Formatting elements: <font>, <basefont>, <u>, <s>, <strike>, <b>, <big>, <i>, <small>, <sub>, <sup>, <tt>, <abbr>, <acronym>, <address>, <cite>, <code>, <del>, <dfn>, <em>, <ins>, <kbd>, <q>, <samp>, <strong>, <var>, <blockquote>, <br>, <bdo>, <div>, <hr>, <h1><h6>, <p>, <pre>, and <span>
List elements: <li>, <dl>, <dt>, <dd>, <ol>, and <ul>
Hyperlink elements: <a>
Image and image map elements: <img>, <map>, and <area>
Table elements: <table>, <caption>, <thead>, <tfoot>, <tbody>, <colgroup>, <col>, <tr>, <td>, and <th>
Form elements: <form>, <input>, <select>, <option>, <optgroup>, <textarea>, <button>, <label>, <fieldset>, and <legend>
Frame elements: <frameset>, <frame>, <noframes>, and <iframe>
Executable content elements: <object>, <param>, and <applet>
TIP
In some cases, elements covered in this chapter get a more thorough treatment in a later chapter of the book. Look for cross-references to point you to this expanded coverage.
Within a given section, several elements are discussed in detail. Specifically, you'll find the following information about each element:
The element's keywordFor example, the <input> element's keyword is input.
What kind of element it isEvery XHTML element is either a container element or a standalone element. A container element activates an effect and has a companion closing element that discontinues the effect. For example, <i> is a container element that, together with its companion closing element </i>, causes all text found between them to be rendered in italic. The <i> element turns on the italic effect, and the </i> element turns it off.
A standalone element does not have a companion element. For example, the <img /> element places an image on a page. <img /> has no effect that was turned on and needs to be turned off, so no closing element is needed.
NOTE
Standalone elements are sometimes called empty elements. The rules of XML require that empty elements have a trailing forward slash inside them, which is why you see the forward slash character within the <img /> element.
-
The element's functionA description of the effect or page element that the element controls.
The element's syntaxXHTML is an application of XML, so adherence to proper syntax is important if you want your documents to be rendered.
The element's attributesAn attribute modifies how an element's effect is applied. Some elements take no attributes, and others might take several. Additionally, attributes can sometimes take on only one of a set number of values. In these cases, the possible values of the attribute are listed along with the attribute. Use of some attributes might be required (such as the src attribute for the <img /> element), and others might be optional. An element's required attributes, if any, are noted in each attribute discussion.
Sample useYou can learn more about how an element is used by looking over the sample code given in the element description.
Related elementsSome elements work in conjunction with others to produce an effect. In these cases, you'll find a listing of the other XHTML elements related to the one being described. Often, you'll find that the related elements are discussed in the same section.
Within a section, elements are listed alphabetically by keyword, unless they need to be used in a certain order, in which case, they are presented in the order that they are typically used.