Encodera

Thanks for reading!

Donate to the site — we work hard for you.

HTML & CSS reference

<ul>

A bulleted list: items whose order does not matter.

Syntax

<ul>
  <li>Item</li>
</ul>

Examples

A shopping list:

<ul>
  <li>Milk</li>
  <li>Bread</li>
  <li>Coffee beans</li>
</ul>

A list without bullets — for a menu:

<style>
  .menu { list-style: none; padding: 0; display: flex; gap: 16px; }
</style>
 
<ul class="menu">
  <li><a href="#">Home</a></li>
  <li><a href="#">Contacts</a></li>
</ul>

Notes

Only <li> items may be direct children of <ul>; text and other tags go inside an item. Change the markers with the CSS list-style property and the left indent with padding.

See also

  • <ol> — A numbered list: items whose order matters.
  • <li> — An item of a `<ul>`, `<ol>` or `<menu>` list.
  • <menu> — A list of commands — for example, a toolbar; behaves like `<ul>`.
  • <nav> — A block of main navigation: the site menu, a table of contents, breadcrumbs.

Related recipes

In the tutorial

  • Lists — Bulleted and numbered lists, numbering options, nested lists and description lists in HTML.

Thanks for reading!

Donate to the site — we work hard for you.