HTML The Definitive Guide (87 page)

Read HTML The Definitive Guide Online

Authors: Chuck Musciano Bill Kennedy

BOOK: HTML The Definitive Guide
6.26Mb size Format: txt, pdf, ePub

Leaf mites

The leaf mite will ravage the Kumquat tree, stripping it of any and all vegetation.

Trunk dropsy

This microscopic larvae of the common opossum chigger will consume the structural elements of the tree trunk, causing it to collapse inward.


Figure 8.10: A definition list as presented by Netscape
As with other list types, you can add more space between the list items by inserting paragraph

tags between them or by defining a spacious style for the

  • tag.

    8.7.1.1 More compact definition lists

    The

    tag supports has the compact attribute, advising the browser to make the list presentation as small as possible. Few browsers, if any, honor this attribute, and it has been deprecated in HTML

    4.0.

    8.7.1.2 The class, dir, id, lang, style, title, and event attributes
    The many other attributes for the

    tag should be quite familiar by now. The style and class attributes, of course, let you control the display style; the id and title tag attributes let you uniquely label its contents; the dir and lang attributes let you specify its native language; and the many on-event attributes let you react to user-initiated mouse and keyboard actions on the contents.

    Not all are implemented by the currently popular browsers for this tag or for many others.
    Section

    3.5.1.1 in
    Chapter 3
    Section 3.5.1.2
    in
    Chapter 3
    Section 4.1.1.4
    in Chapter 4
    Section 4.1.1.5 in

    Chapter 4
    Section 9.1.1 in
    Chapter 9
    Section 9.2.4
    in Chapter 9
    Section 13.3.3
    in Chapter 13

    8.7.2 The

    Tag

    This

    tag defines the term component of a definition list. It is valid only when used within a definition
    list preceding the term or item, before the
    tag and the term's definition or explanation.


    Function:

    Define a definition list term

    Attributes:

    CLASS ONKEYUP

    DIR ONMOUSEDOWN

    ID ONMOUSEMOVE

    LANG ONMOUSEOUT

    ONCLICK ONMOUSEOVER

    ONDBLCLICK ONMOUSEUP

    ONKEYDOWN STYLE

    ONKEYPRESS TITLE

    End tag:

    ; always omitted

    Contains:

    text

    Used in:

    dl_content

    Traditionally, the definition term that follows the

    tag is short and sweet - a word or few.

    Technically, it can be any length. If long, the browser may exercise the option of extending the item beyond the display window, or wrap it onto the next line where the definition begins.

    Since the end of the

    tag immediately precedes the start of the matching
    tag, it is unambiguous and so not required.

    8.7.2.1 Formatting text with


    In practice, browsers are either too lenient or too dumb to enforce the HTML rules, so some tricky HTML authors misuse the
    tag to shift the left margin right and left, respectively, for fancy text displays. (Remember, tab characters and leading spaces don't usually work with regular text.) We don't condone violating the HTML standard and caution you once again about tricked-up documents.

    Use style sheets instead.

    8.7.2.2 The class, dir, id, lang, style, title, and event attributes
    The

    tag supports the standard HTML 4.0 tag attributes. The style and class attributes, of course, let you control the display style; the id and title tag attributes let you uniquely label its contents; the dir and lang attributes let you specify its native language; and the many on-event attributes let you react to user-initiated mouse and keyboard actions on the contents. Not all are
    implemented by the currently popular browsers for this tag or for many others. [The dir attribute,

    3.5.1.1] [The lang attribute, 3.5.1.2]
    [The id attribute, 4.1.1.4]
    [The title attribute, 4.1.1.5]
    [Inline

    Styles: The style Attribute, 9.1.1]
    [Style Classes, 9.2.4]
    [JavaScript Event Handlers, 13.3.3]

    8.7.3 The

    Tag

    The

    tag marks the start of the definition portion of an item in a definition list. According to the HTML standard,
    belongs only inside a definition
    list, immediately following the
    tag and term and preceding the definition or explanation.


    Function:

    Define a definition list term

    Attributes:

    CLASS ONKEYUP

    DIR ONMOUSEDOWN

    ID ONMOUSEMOVE

    LANG ONMOUSEOUT

    ONCLICK ONMOUSEOVER

    ONDBLCLICK ONMOUSEUP

    ONKEYDOWN STYLE

    ONKEYPRESS TITLE

    End tag:

    ; always omitted

    Contains:

    flow

    Used in:

    dl_content

    The content that follows the

    tag may be any HTML construct, including other lists, block text, and multimedia elements. Although treating it otherwise identically as conventional content, browsers typically indent definition list
    definitions. And since the start of another term and definition (
    ) or the required end tag of the definition (
    ) unambiguously terminates the preceding definition, the
    tag is not needed and its absence makes your source text more readable.

    8.7.3.1 The class, dir, id, lang, style, title, and event attributes
    The

    tag supports the standard HTML 4.0 tag attributes. The style and class attributes, of course, let you control the display style; the id and title tag attributes let you uniquely label its contents; the dir and lang attributes let you specify its native language; and the many on-event attributes let you react to user-initiated mouse and keyboard actions on the contents. Not all are
    implemented by the currently popular browsers for this tag or for many others. [The dir attribute,

    3.5.1.1] [The lang attribute, 3.5.1.2]
    [The id attribute, 4.1.1.4]
    [The title attribute, 4.1.1.5]
    [Inline

    Styles: The style Attribute, 9.1.1]
    [Style Classes, 9.2.4]
    [JavaScript Event Handlers, 13.3.3]

    8.6 Menu Lists

    8.8 Appropriate List Usage

  • Other books

    The Crown of Dalemark by Diana Wynne Jones
    The Judge by Steve Martini
    Mrs. Jones' Secret Life by Maddox, Christopher
    Lockdown by Diane Tullson
    Queen of This Realm by Jean Plaidy
    The Bastard by Inez Kelley
    Breaking Ties by Vaughn R. Demont
    A Spinster's Luck by Rhonda Woodward
    Elie Wiesel by The Forgotten