An unordered list is a way to present multiple items where order doesn’t matter. In HTML it’s created with the
- element and each item is wrapped in
- . Common uses: feature lists,
Key points:
- Bullets (usually) mark items instead of numbers.
- Nesting:
- may contain other
- Styling: CSS can change bullet type (disc, circle, square) or replace bullets with images.
- Accessibility: Use meaningful list structure; assistive tech announces it as a list with X items.
- Semantics: Use unordered lists for sets, not for steps or ranked items (use ordered lists
- for those).
- for sublists.
Example HTML:
- First item
- Second item
<ul class="list-inside list-disc whitespace-normal [li_&]:pl-6" data-streamdown="unordered-list"> <li class="py-1 [&>p]:inline" data-streamdown="list-item"><span data-sd-animate="true" style="--sd-animation: sd-fadeIn; --sd-duration: 0ms; --sd-easing: ease-in;">Subitem</span></li> </ul> - Third item
Leave a Reply