Skip to the page
html reference · lists

HTML <ul> / <li> tags

closing tag
required (both)
void element
no
lives inside
<body>
typically holds
one or more <li> items

Where it goes

<ul> wraps the items. Every tag directly inside <ul> must be an <li>. Nothing else goes straight inside it.

Example

<ul>
  <li>Milk</li>
  <li>Eggs</li>
</ul>

Open this example in the editor →

Common mistakes

  • Putting text or other tags straight inside <ul> instead of wrapping each item in <li>.
  • Putting a sub-list next to the items instead of inside one. A nested <ul> goes inside the <li> it belongs to, after that item's text.
  • Using a list just to get bullets or indent. A menu is a list. A decorative arrow before a heading is CSS.

Related

Updated 24 October 2026. Practice it in the html route, or read more on MDN.