Lists
suggest changeIntroduction
HTML offers three ways for specifying lists: ordered lists, unordered lists, and description lists. Ordered lists use ordinal sequences to indicate the order of list elements, unordered lists use a defined symbol such as a bullet to list elements in no designated order, and description lists use indents to list elements with their children. This topic explains the implementation and combination of these lists in HTML markup.
Syntax
<ol> ordered list items </ol>
<ul> unordered list items </ul>
<li> list item (ordered and not) </li>
<dl> description list items </dl>
<dt> description list title </dt>
<dd> description list description </dd>
Remarks
See Also
You can add a list-style-type CSS property to an <ul>
tag in order to change what kind of icon is used to mark each list item, for example <ul style="list-style-type:disc">
. The following list-style-types are permitted:
- “list-style-type:disc” is the default dot.
- “list-style-type:circle” is an unfilled circle.
- “list-style-type:square” is a filled square.
- “list-style-type:none” uses no mark at all.
You can also add a type attribute to an <ol>
tag in order to change how numbering is done, for example <ol type="1">
. The following types are permitted:
- type=“1” is the default form.
- type=“A” uses uppercase letters in alphabetical order
- type=“a” uses lowercase letters in alphabetical order
- type=“I” uses roman numerals with uppercase lettering
- type=“i” uses roman numerals with lowercase lettering