Open code, practice, and notes →
Download source with English comments · for reading
HTML · 08 figure and Combined Descriptions
Series contents · Technology map
Stage: Tables and Form Inputs · Editable example · Storage ID: html-step-08
Goals and learning outcomes
- Check the 2 pieces of material and their shared comparison conditions.
- Write down the distinct roles of image-difference descriptions and the caption.
Prerequisites
The work and experiment records from Unit 7, “Images and Alternative Text”.
Key concepts and explanations
Self-contained Material
figure groups self-contained material referenced in the body. Depending on context, it can contain code or tables as well as images.
Captions
figcaption provides a description for a figure. It does not always need to repeat the image’s alt text.
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 figure.html, prepare before-and-after images of the same scene and a reference in the body.
- Group two before-and-after experiment images in a figure, and write the comparison conditions in figcaption.
- Run with before-and-after images of the same scene and a reference in the body. Results to check: Check the 2 pieces of material and their shared comparison conditions. Write down the distinct roles of image-difference descriptions and the caption. Record expected and actual results separately.
Variables to observe
| Variable | Baseline | Change | Expected change / hypothesis |
|---|---|---|---|
| Description Location | Regular p | figcaption | Pre-run hypothesis: The structure will express the relationship between the material and its description. 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 the 2 pieces of material and their shared comparison conditions.
- Write down the distinct roles of image-difference descriptions and the caption.
Self-check
- Does the material remain understandable if moved within the body?
- Can a figure contain multiple images?
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: Images and Alternative Text · Next: Table Row and Column Relationships