HTML Lists & Images
[Classroom Tip] This demo makes all three HTML list types visible, shows nested lists, demonstrates images with and without alt text, and illustrates the <figure>/<figcaption> pattern.
<ul>)Order doesn't matter. Use for collections.
<ol>)Sequence matters. Use for steps, instructions.
<dl>)Term/definition pairs. Use for glossaries, FAQs.
Lists can be placed inside other lists using proper parent–child nesting.
<ul>
<li>Front-End
<ul>
<li>HTML</li>
<li>CSS</li>
</ul>
</li>
<li>Back-End
<ul>
<li>Node.js</li>
<li>Databases</li>
</ul>
</li>
</ul>
The alt attribute describes the image for screen readers and when images fail to load.
<img src="photo.jpg"
alt="A landscape photo
of mountains at sunset"
width="300">
<img src="broken-path.jpg"
alt="A landscape photo
of mountains at sunset">
Broken path — browser shows alt text instead.
alt="" (empty string). Screen readers will skip it.
Wrap images in <figure> to associate a caption semantically.
<figure>
<img
src="chart.png"
alt="Bar chart showing
2026 web tech usage"
width="300"
/>
<figcaption>
Figure 1: Web Technology
Popularity in 2026
</figcaption>
</figure>
Type an item and choose the list type to add it to the live list below.