Codectionary / Developer documentation / HTML

<ul>

The <ul> element represents an unordered list of items, typically displayed with bullet points. The order of items has no semantic meaning — use <ol> instead when sequence matters. Every item inside a <ul> must be wrapped in an <li> (list item) element. Unordered lists are commonly used for navigation menus, feature lists, and any collection of related items.

Syntax

<ul>
  <li>Item one</li>
  <li>Item two</li>
</ul>

Examples

Basic List

A simple unordered list.

<ul>
  <li>HTML</li>
  <li>CSS</li>
  <li>JavaScript</li>
</ul>

Navigation Menu

Using a list to build a semantic navigation menu.

<nav>
  <ul style="list-style: none; display: flex; gap: 20px; padding: 0;">
    <li><a href="#home">Home</a></li>
    <li><a href="#about">About</a></li>
    <li><a href="#contact">Contact</a></li>
  </ul>
</nav>

Nested List

Lists can be nested inside list items to represent hierarchy.

<ul>
  <li>Frontend
    <ul>
      <li>React</li>
      <li>Vue</li>
    </ul>
  </li>
  <li>Backend
    <ul>
      <li>PHP</li>
      <li>Node.js</li>
    </ul>
  </li>
</ul>

Attributes

  • type (disc | circle | square): Deprecated — use the CSS list-style-type property instead

Best practices

  • Only place <li> elements as direct children of <ul>
  • Use <ul> when the order of items does not matter; use <ol> when it does
  • Style bullet appearance with CSS list-style-type rather than the deprecated type attribute
  • Wrap navigation lists in a <nav> element for better accessibility

Browser compatibility

Support applies to the named feature, not every attribute or behaviour in this article. Versions refer to browsers, not operating systems.

<ul>

Desktop

Chrome
Supported
From 1
Firefox
Supported
From 1
Safari
Supported
By 4 (possibly earlier)
Edge
Supported
From 12
Opera
Supported
From 15

Mobile

Safari on iOS
Supported
By 3.2 (possibly earlier)
Chrome for Android
Supported
From 18
Firefox for Android
Supported
From 4
Samsung Internet
Supported
From 1.0

MDN BCD record for this feature · MDN reference

Support history and limitations

Chrome

  • From 1

Firefox

  • From 1

Safari

  • By 4 (possibly earlier)

Edge

  • From 12

Opera

  • From 15

Safari on iOS

  • By 3.2 (possibly earlier)

Chrome for Android

  • From 18

Firefox for Android

  • From 4

Samsung Internet

  • From 1.0
<ul> type

Deprecated feature: avoid in new projects.

Desktop

Chrome
Supported
From 1
Firefox
Supported
From 1
Safari
Supported
By 4 (possibly earlier)
Edge
Supported
From 12
Opera
Supported
From 15

Mobile

Safari on iOS
Supported
By 3.2 (possibly earlier)
Chrome for Android
Supported
From 18
Firefox for Android
Supported
From 4
Samsung Internet
Supported
From 1.0

MDN BCD record for this feature

Support history and limitations

Chrome

  • From 1

Firefox

  • From 1

Safari

  • By 4 (possibly earlier)

Edge

  • From 12

Opera

  • From 15

Safari on iOS

  • By 3.2 (possibly earlier)

Chrome for Android

  • From 18

Firefox for Android

  • From 4

Samsung Internet

  • From 1.0

MDN BCD 8.1.5 · Dataset built 2026-10-08 · Mapping reviewed 2026-10-21. These dates are not individual browser-test or claim-verification dates. Unknown means the data does not establish support.

HTML Living Standard

Specifications & further reading