2.3. Numbered, Bulleted, and Indented Lists
HTML enables you to create numbered or ordered lists (OL), bulleted or unordered lists (UL), and definition lists (DL) with left-indented sections but without a number or bullet. Lists can be nested and can appear inside table cells. The older MENU and DIR lists are still supported by browsers, but because these lists have been superseded by newer constructs, we do not discuss them here.
Numbered Lists
HTML Element: | <OL ...> ... </OL> |
Attributes: | TYPE, START, COMPACT |
The OL element creates numbered (ordered) lists. The LI (list item) element specifies individual entries within a list and can contain most other block-level elements (including tables and other lists) except for heading (H1 through
Get Core Web Programming, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.