Sams Teach Yourself HTML, CSS & JavaScript Web Publishing in One Hour a Day

(singke) #1
ptg16476052

Nesting Lists 83

5


Indenting nested lists in HTML code itself helps show their relationship to the final
layout:



  1. WWW

  2. Organization

  3. Beginning HTML



    • What HTML is

    • How to Write HTML

    • Doc structure

    • Headings

    • Paragraphs

    • Comments



  4. Links

  5. More HTML


Many browsers format nested ordered lists and nested unordered lists differently from
their enclosing lists. They might, for example, use a symbol other than a bullet for a
nested list, or they might number the inner list with letters (a, b, c) rather than numbers.
Don’t assume that this will be the case, however, and refer back to “section 8, subsection
b” in your text because you can’t determine what the exact formatting will be in the final
output. If you do need to be sure which symbols or numbering scheme will be used for a
list, specify a style using CSS.


The following input and output example shows a nested list and how it appears in a
browser (see Figure 5.9):


Input ▼


Peppers



  • Bell

  • Chile



    • Serrano

    • Jalapeno

    • Habanero

    • Anaheim



  • Szechuan

  • Cayenne

Free download pdf