Lists are among the most useful elements available, and not because of the bullets. A screen reader announces a list and states how many items it contains, then lets a user move between them or skip past the whole thing. That is real navigational structure, and it is lost the moment a list is faked with paragraphs and dashes.
The two main types
An unordered list is for items whose sequence does not matter. Reordering them would not change the meaning.
<ul> <li>Selectors</li> <li>The box model</li> <li>Flexbox</li> </ul> An ordered list is for items where sequence is part of the content: steps in a process, a ranking, or a numbered set of rules.
<ol> <li>Install the dependencies</li> <li>Copy the configuration file</li> <li>Run the build</li> </ol> Choose based on whether order matters, not on whether you prefer bullets or numbers. Both markers are default styles and either can be changed or removed entirely in CSS.
Only list items may be direct children
This is the rule most often broken. A list may contain list items and nothing else at that level. Text placed directly inside a list, or a div wrapped around several items, is invalid and gets relocated by the parser.
The list item itself, however, is permissive. It can hold anything: paragraphs, headings, images, nested lists, entire sections. So when you need to group content, put the wrapper inside the item rather than around several of them.
Nesting lists
A nested list goes inside a list item, not between two of them. This is the second most common mistake.
<ul> <li>HTML <ul> <li>Basics</li> <li>Forms</li> </ul> </li> <li>CSS</li> </ul> Note where the closing tag of the outer list item sits: after the inner list, not before it. Placing it before produces a list containing another list as a sibling of its items, which is invalid and gives an incorrect structure to anything reading the tree. Browsers change the bullet style automatically at each nesting level, which is a visual cue only and carries no meaning.
Useful attributes on ordered lists
Three attributes are worth knowing. The start attribute begins numbering at a value other than one, which matters when a list is split across a page. The reversed attribute counts downwards, useful for a countdown ranking. The type attribute switches to letters or roman numerals, though the CSS list style type property is the better place for that since it is presentational.
<ol start="5"> <li>Continues from five</li> </ol> An individual list item may also carry a value attribute to set its own number explicitly, with subsequent items continuing from there.
Navigation is a list
A site menu is a list of links, and marking it up as one is the established convention.
<nav> <ul> <li><a href="/html/">HTML</a></li> <li><a href="/css/">CSS</a></li> </ul> </nav> The benefit is that a screen reader announces how many items the menu contains before the user commits to listening to all of them. Making it horizontal is a CSS job, usually by making the list a flex container, and removing the bullets is one declaration. Neither requires abandoning the list.
Styling markers
The list style type property controls the marker, and setting it to none removes it. Be aware that removing markers can cause some screen readers to stop announcing the element as a list, which defeats the purpose. Where the list role matters and the markers must go, adding an explicit list role attribute restores the announcement.
Counting with CSS counters
When the default numbering is not enough, CSS counters let you build your own. This is how a legal document produces numbering like 2.3.1 across nested levels, and how a recipe can restart its step numbers in each section. The counter is defined on the list, incremented on each item, and displayed through generated content on the marker.
Spacing between items
Two properties handle almost all list spacing. Margin on the list item controls the gap between items, and padding on the list itself controls how far the whole block is indented from the text around it. People frequently adjust the wrong one, then wonder why removing the indentation also pulls the markers outside the container.
That happens because the markers sit in the padding area by default. The list style position property moves them inside the item box instead, which changes how text wraps underneath a marker and is worth knowing about before you spend time fighting an alignment that will not behave.
When something is not a list
Not every group of similar things needs list markup. A run of paragraphs in an article is prose, and wrapping each in a list item makes a screen reader announce a count that means nothing. Ask whether the items are genuinely parallel and whether knowing how many there are would help someone. If the answer to both is yes, it is a list.