HTML and CSS Reference
In-Depth Information
|\ / Here's one way to
o o o connect all 9
| X dots using only 4
o o o straight lines:
|/ \
Figure 2.14: A web page with a preformatted element
A list is a block element containing a sequence of list items. HTML provides
several types of lists, including ordered lists , unordered lists , deinition lists,
and menus . Ordered lists have sequenced items, whereas unordered lists have
bulleted items. he list item element, which is where the content goes, is also a
block element. A list element may have only list items as its direct descendents.
Ordered lists use the tags <ol></ol> to enclose and mark the entire list
structure. Unordered lists use <ul></ul> tags. List items are enclosed in the
tags <li></li> . When rendered by the browser, list items are usually indented
from the let margin. Although ordered and unordered lists can contain only
list items as their immediate child elements, list item elements can contain
any content and markup, including other lists. Example 2.15 shows the HTML
markup for nesting an unordered list inside an ordered list. his might be used
in an outline or table of contents, for example.
Search WWH ::

Custom Search