An unordered list is a way to present a set of items without implying a specific order or priority. Common uses and characteristics:
- Purpose: group related items where sequence doesn’t matter (features, options, shopping list).
- Appearance: typically shown with bullets (•, –, ○) rather than numbers.
- Structure (HTML): the
- element contains multiple
- items.
- Accessibility: use semantic markup (
- /
- ) so screen readers announce it as a list; provide clear item text.
- Styling: CSS controls bullet style, spacing, alignment, and custom markers (list-style-type, list-style-image, padding/margin).
- Nesting: unordered lists can contain nested ordered or unordered lists for subgroups.
- Best practices:
- Keep items short and parallel in structure.
- Avoid using for steps or ordered procedures—use ordered lists instead.
- Use headings or introductory text when list context isn’t obvious.
Example (HTML):
html
<ul><li>Apples</li> <li>Bread</li> <li>Milk</li></ul>
Leave a Reply