The Meridian crew is packing for a night rescue. The launch sequence must be numbered, the rescue kit needs bullets, and two mission terms need short explanations.
A page with three list types: numbered launch steps, a bulleted rescue kit, and a glossary pairing mission terms with their meanings.
The preceding demo's launch steps used <ol> because sequence mattered. Its kit used <ul> because the items can be packed in any order. A <dl> pairs each <dt> term with its <dd> description. Each ordered or unordered list item goes in an <li>.
For a different brief, a supply list could look like this:
<ul>
<li>Water flask</li>
<li>Field notebook</li>
</ul>
<dl>
<dt>Relay</dt><dd>Passes a message to the bridge.</dd>
</dl>
Preview the page. The setup steps should be numbered, the supplies should have bullets, and each term in the description list should sit next to its explanation. If the sequence is not numbered, inspect the outer list tag first.
Build a page that uses all three list types:
<ol> to the page.<ol>, add at least 3 <li> steps.<ul> to the page.<ul>, add at least 3 <li> items.<dl> to the page.<dl>, add at least 2 <dt> terms, each followed by a matching <dd> definition.The crew now has steps, supplies, and short explanations in the right list shapes.
Use <ol> for ordered (numbered) lists and <ul> for unordered (bullet) lists.
Each item in an ordered or unordered list is wrapped in an <li> tag.
For a description list, use <dl> with <dt> for the term and <dd> for the description.
Lists can be nested: put a <ul> or <ol> inside an <li> to create sub-lists.