LOGBOOK

HELP

Quiz Entry - updated: 2026.10.30

How do you create lists in HTML, and what is the difference between <ul> and <ol>?

Lists wrap their entries in <li> elements inside either a <ul> (unordered, bullet points) or an <ol> (ordered, numbered) container.

Lists are one of HTML's core text structures, alongside paragraphs and headings. Both kinds share the same pattern — a container element holding one <li> ("list item") per entry:

<ul>                      <ol>
    <li>Apples</li>           <li>Preheat the oven</li>
    <li>Pears</li>            <li>Mix the dough</li>
</ul>                     </ol>

The choice between the two containers is a semantic one:

  • <ul> (unordered list) — the entries are peers with no meaningful sequence; browsers render bullet points. Typical use: a set of options, or a site's navigation menu (a <nav> element usually wraps exactly such a <ul> of links).
  • <ol> (ordered list) — the sequence carries meaning; browsers number the entries automatically. Typical use: step-by-step instructions or a ranking.

Pick by asking: would reordering the entries change the meaning? If yes, it's <ol>; if no, <ul>. Lists also nest — an <li> may itself contain another <ul> or <ol>, which is how multi-level menus are built.

Go deeper:

From Quiz: WEBT / HTML Documents | Updated: Oct 30, 2026