Prev | Current Page 172 | Next

Craig Grannell

"The Essential Guide to CSS and HTML Web Design"

It works
in the same way as an unordered list, the only difference being the containing element,
which is
    .

    1. List item one

    2. List item two

    3. List item 'n'


    Definition lists
    A definition list isn??™t a straightforward list of items. Instead, it??™s a list of terms and explanations.
    This type of list isn??™t common online, but it has its uses. The list itself is enclosed in
    the definition list element (
    ), and within the element are placed terms and definitions,
    marked up with
    and
    , respectively. Generally speaking,
    browsers display the definition with an indented left-hand margin, as in the following
    example.
    Web browsers automatically insert the item numbers when you use ordered lists. The
    only way of controlling numbering directly is via the start attribute, whose value dictates
    the first number of the ordered list. Note, though, that this attribute is deprecated
    ??”use it and your web page will not validate as XHTML Strict.
    Unlike HTML, XHTML lists require end tags on all list elements. In
    HTML, the end tag was optional.
    WORKING WITH TYPE
    107
    3

    Cat

    Four-legged, hairy animal, with an
    ?? inflated sense of self-importance

    Dog

    Four-legged, hairy animal, often with
    ?? an inferiority complex


    Nesting lists
    Lists can be nested, but designers often do so incorrectly, screwing up their layouts and
    rendering web pages invalid.


    Pages:
    160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184