Open code, practice, and notes →
Download source with English comments · for reading
HTML · 05 Lists and Term Descriptions
Series contents · Technology map
Stage: Document Meaning and Content · Editable example · Storage ID: html-step-05
Goals and learning outcomes
- Check in the DOM that the item counts are 4·3·2 respectively.
- Descriptions are associated with the two terms.
Prerequisites
The work and experiment records from Unit 4, “Paragraphs and Text Semantics”.
Key concepts and explanations
List Order
ol represents items whose order matters. ul is suitable for groupings where order does not matter.
Description Lists
dl associates terms with descriptions. Do not choose dt and dd simply for indentation.
Practice setup
First check the execution scope guidance on the example screen. The following environment is for extending the assignment in a separate project. Implement it yourself in a separate local project and check it with browser developer tools. Prepare HTML and any necessary image/media files in a separate folder and open them through a local HTTP server. Check with the Elements and accessibility panels and actual keyboard operation.
The linked example is a starting point. It does not implement every task below. Complete work beyond its supported scope in a separate project.
Practice tasks
- In lists.html, prepare 4 exercise steps, 3 supplies, and 2 terms.
- Use ol for the exercise sequence, ul for supplies, and dl for the glossary.
- Run with 4 exercise steps, 3 supplies, and 2 terms. Results to check: Check in the DOM that the item counts are 4·3·2 respectively. Descriptions are associated with the two terms. Record expected and actual results separately.
Variables to observe
| Variable | Baseline | Change | Expected change / hypothesis |
|---|---|---|---|
| Procedure Element | ul | ol | Pre-run hypothesis: Ordering information will be included in the list semantics. Keep other conditions fixed and record the actual result separately after running. |
Predictions in this table are not measured results. Change one condition at a time and record why the actual result differs.
Completion criteria
- Check in the DOM that the item counts are 4·3·2 respectively.
- Descriptions are associated with the two terms.
Self-check
- Does a visually ordered presentation always call for ol?
- Inside which item should a nested list go?
Official references
Linked example and execution scope
Example source · Runtime environments and limits
Compare the editable input with actual browser execution results. Scope document body/html selectors within Shadow DOM. @media responds to the outer preview viewport, while the width slider changes only the container. Network access, form navigation, and iframe execution are restricted.
Source code and records are not overwritten automatically. Resetting an existing example also preserves your notes.
Next learning
Previous: Paragraphs and Text Semantics · Next: Link Paths and In-page Navigation