Sub topic 7
Use lists for steps, options, and requirements
This chapter assumes you know the basic HTML list elements (ul, ol, li) and have read the earlier chapters on heading hierarchy, self-contained sections, and answer-first paragraphs. Here you will learn when a list is the right format, how to mark it up so its meaning survives extraction, and which list mistakes make content harder for retrieval systems to use.
Why lists matter to retrieval systems
Retrieval-based answer systems split a page into passages, pick the passages that best match a question, and quote or summarize them. A list gives the splitter and the reader a clear signal: these items belong together, and each item is a separate unit. A numbered list also says that the order carries meaning.
Lists help in three ways:
- Each item is a short, bounded statement. A system can quote one item or the whole list without cutting a sentence in half.
- The list element names the relationship between items. An
olmeans a sequence. Aulmeans a set with no required order. - The list is easy to compare with the question. A question that starts with "how do I" or "what are the requirements for" matches a list of actions or conditions well.
No format guarantees that a page is cited. Lists make your content easier to use. They do not make it more likely to be chosen over a better answer elsewhere.
Choose ordered or unordered
The first decision is whether order matters. Ask one question: if a reader did these items in a different order, would the result change or fail?
| Content | Order matters? | Element |
|---|---|---|
| Steps in a procedure | Yes | `ol` |
| Ranked items, such as "top five" | Yes | `ol` |
| Requirements or prerequisites | No | `ul` |
| Options or alternatives | No | `ul` |
| Features of a product | No | `ul` |
Use the element that matches the meaning, not the one whose bullets look right. If you want numbers hidden or bullets shown, change that with CSS. The element still carries the meaning.
Write steps as an ordered list
A procedure is the most common case. Each li should be one action that a reader can complete and check. Start each item with a verb, and keep conditions and results close to the action they describe.
Open the section with the answer, then give the list. This follows the answer-first pattern from the previous chapter. A system that quotes only the first sentence still gives a useful reply, and a system that quotes the list gives the full procedure.
<h2>How do I factory reset the router?</h2>
<p>Hold the reset button for about 10 seconds until the lights blink.</p>
<ol>
<li>Power on the router and wait for it to finish starting.</li>
<li>Press and hold the reset button for 10 seconds.</li>
<li>Release the button and wait for the router to restart.</li>
<li>Sign in with the default credentials printed on the label.</li>
</ol>Notice what this markup does:
- The heading is a question, and the paragraph beneath it answers it in one sentence.
- Each item has one action. Step 2 does not also say what happens after the restart.
- The list sits directly under the paragraph that introduces it, so the section stays self-contained.
Keep one action per item
A common error is packing several actions into one item.
<ol>
<li>Open Settings, choose Network, select Advanced, and click Reset, then confirm the prompt.</li>
</ol>This is one item holding five actions. A reader cannot tell where they are if a step fails, and an extracted quote gives no way to refer to a single step. Split it:
<ol>
<li>Open Settings.</li>
<li>Choose Network, then Advanced.</li>
<li>Click Reset.</li>
<li>Confirm the prompt.</li>
</ol>Grouping closely linked clicks, as in item 2, is acceptable. The test is whether the reader would ever want to stop between the two actions.
Put warnings before the step they affect
If a step can destroy data, say so before the step. A warning placed after the list may be dropped when a system quotes only part of the content. Put the caution in the intro paragraph or in the item itself.
<h2>How do I delete a project?</h2>
<p>Deleting a project removes its files permanently, so export anything you need first.</p>
<ol>
<li>Export the project files from the Export menu.</li>
<li>Open Project Settings.</li>
<li>Select Delete project and type the project name to confirm.</li>
</ol>Write requirements and options as unordered lists
Requirements are conditions that must all hold. Options are alternatives from which the reader picks one or more. Both are unordered, but the introducing sentence must say which kind of list follows. The same bullets can mean "all of these" or "any of these," and the list itself does not say.
<h2>What do I need to install the agent?</h2>
<p>You need a 64-bit operating system, 2 GB of free disk space, and administrator access.</p>
<ul>
<li>A 64-bit version of Windows 11, macOS 13, or Ubuntu 22.04</li>
<li>At least 2 GB of free disk space</li>
<li>An account with administrator rights</li>
</ul>For options, name the choice in the lead-in.
<h2>How can I sign in?</h2>
<p>You can sign in with a password, a passkey, or a single sign-on provider.</p>
<ul>
<li>Password: use the email address and password you registered with.</li>
<li>Passkey: confirm with your device's fingerprint, face, or PIN.</li>
<li>Single sign-on: choose your company's provider on the sign-in page.</li>
</ul>Each option starts with a short label, then a colon, then what it means. This makes every item understandable if quoted alone.
Make items parallel and self-explanatory
Items in one list should share a grammatical form. Parallel items are easier to scan, and a system quoting one item still gets a complete statement.
- Weak: a mix of fragments and sentences, such as "Disk space", "You must have admin rights", and "Internet."
- Better: "At least 2 GB of free disk space", "Administrator rights", "An internet connection".
Avoid items that depend on the previous one for meaning, such as "Then do the same for the second option." If a system quotes that item, it has no referent. Repeat the noun instead.
Include units, versions, and names in the item. "At least 2 GB" is useful on its own. "Enough space" is not.
Nested lists
A nested list places a ul or ol inside an li. Use it when items have genuine sub-items, such as a step with several choices.
<ol>
<li>Choose a backup location:
<ul>
<li>Local disk for fast restores</li>
<li>Cloud storage for protection against hardware loss</li>
</ul>
</li>
<li>Select how often the backup runs.</li>
<li>Start the first backup.</li>
</ol>The nested ul must be inside the parent li, not a sibling of it. Placing a ul directly inside an ol is invalid HTML and can be parsed unpredictably.
Limit nesting to one level. Deep nesting makes it hard for a splitter to keep the parent context with a deep child, and a reader loses the thread too. If you need three levels, consider separate sections with their own headings.
Lists and passage boundaries
A retrieval system may cut a long page into passages of a fixed size or at structural boundaries. A very long list can be split in the middle, so the second passage has items but no introduction.
You can reduce this risk:
- Keep lists to roughly 3 to 9 items when you can.
- Break a long procedure into phases, each under its own heading, with its own lead-in sentence.
- Make each phase a self-contained section, as described in the earlier chapter.
Each phase now has its own question-style heading and opening sentence, so any one of them stands alone.
Mark up lists with real elements
Visual lists made from other elements carry no list meaning. The following all look like lists but are not lists to a parser:
- Lines starting with a typed "-" or "1." inside a
p - Items separated by
brtags - A series of
divelements with a bullet image or a CSS pseudo-element
<p>1. Open the app<br>2. Sign in<br>3. Tap Sync</p>Replace this with:
<ol>
<li>Open the app.</li>
<li>Sign in.</li>
<li>Tap Sync.</li>
</ol>Also avoid the reverse: do not use ul just to indent text or lay out a navigation block when the content is not a set of items. Navigation menus are conventionally lists inside a nav element, which is fine. The mistake is using a list for a paragraph of connected prose.
Common list mistakes
| Mistake | Why it hurts | Fix |
|---|---|---|
| Using `ul` for steps | Order is lost | Use `ol` |
| Several actions in one `li` | Steps cannot be quoted or tracked | One action per item |
| No lead-in sentence | Passage has no context | Add an answer-first sentence |
| Fake lists with `br` or typed numbers | No list semantics | Use `ol` or `ul` |
| Items that need the previous item | Meaning breaks when quoted | Repeat the noun or rewrite |
| Lists of 20 or more items | May be cut mid-list | Split into sections |
| Bullets used for every paragraph | Reasoning is lost | Keep prose for arguments |
Check your lists with a script
You can find some list problems automatically. This script uses only the standard library. It flags paragraphs that look like typed lists and li items with no text.
import re
from html.parser import HTMLParser
class ListCheck(HTMLParser):
def __init__(self):
super().__init__()
self.in_p = False
self.in_li = False
self.p_text = []
self.li_text = []
self.problems = []
def handle_starttag(self, tag, attrs):
if tag == "p":
self.in_p = True
self.p_text = []
elif tag == "li":
self.in_li = True
self.li_text = []
elif tag == "br" and self.in_p:
self.p_text.append("\n")
def handle_data(self, data):
if self.in_p:
self.p_text.append(data)
if self.in_li:
self.li_text.append(data)
def handle_endtag(self, tag):
if tag == "p" and self.in_p:
text = "".join(self.p_text)
lines = [line.strip() for line in text.split("\n") if line.strip()]
typed = [line for line in lines if re.match(r"^(\d+[.)]|[-*•])\s", line)]
if len(typed) >= 2:
self.problems.append("Typed list inside <p>: " + lines[0])
self.in_p = False
elif tag == "li" and self.in_li:
if not "".join(self.li_text).strip():
self.problems.append("Empty <li>")
self.in_li = False
html = """
<p>1. Open the app<br>2. Sign in<br>3. Tap Sync</p>
<ul><li>Real item</li><li></li></ul>
"""
checker = ListCheck()
checker.feed(html)
for problem in checker.problems:
print(problem)Running it prints:
Typed list inside <p>: 1. Open the app
Empty <li>A script cannot judge whether an item holds one action or whether the order really matters. Read each list yourself and apply the checks in the summary below.
Review checklist
- Does order matter? If yes, use
ol. If no, useul. - Does a lead-in sentence introduce the list and state the answer?
- Does each item hold one idea or action?
- Does each item make sense when quoted alone?
- Are items parallel in form?
- Is the list short enough to stay in one passage, or split under headings?
- Is every list made with real
ol,ul, andlielements?
Exercise
A page section is headed "What do I need to join the beta?" The body is a paragraph reading "You need an account. Then you need version 4 or later. Also be 18 or older." Rewrite it as answer-first markup with the correct list element, and explain why you chose that element.
Show answer
Use an unordered list, because the three conditions must all hold but have no required order. For example: <h2>What do I need to join the beta?</h2> <p>You need an account, version 4 or later, and to be 18 or older.</p> <ul> <li>A registered account</li> <li>App version 4 or later</li> <li>An age of 18 or older</li> </ul>. The lead-in states the answer and says all conditions apply, and each item is parallel and understandable alone.
Exercise
This item appears in an ordered list: "Click Save, wait for the green check, and then close the window and restart the app." Name two problems and fix them.
Show answer
The item holds several actions, so a reader cannot track progress or quote one step, and the wait for the green check is a condition that belongs with the click. Split it into: "Click Save and wait for the green check." "Close the window." "Restart the app." Each item is then one checkable action in a meaningful order.