👀 Live Preview
Default unordered list with disc bullets:
- Item 1
- Item 2
- Item 3

The <ul> tag structures unordered lists on webpages. This guide covers syntax, bullet styling, nested lists, common use cases, and how ul differs from ol.
Bullet-point collections without sequence.
Each entry inside list items.
disc, circle, square with CSS.
Hierarchical sub-lists.
Unordered vs ordered lists.
Customize markers with list-style.
<ul> Tag?The <ul> tag is an HTML element used to create unordered lists, where the order of items does not matter. Browsers typically display each list item with a bullet point marker.
Every item in an unordered list must be wrapped in an <li> element. Use ul for feature lists, navigation menus, and any collection where sequence is not important.
Wrap each list item in <li> tags inside the opening and closing <ul> tags:
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>ul is the container; only li (and script-supporting elements) should be direct children.li, not directly under ul.list-style-type instead of the obsolete type attribute.| Topic | Code Snippet | Notes |
|---|---|---|
| Basic ul | <ul><li>...</li></ul> | Default disc bullets |
| Circle bullets | list-style-type: circle; | Open circle marker |
| Square bullets | list-style-type: square; | Square marker |
| No bullets | list-style: none; | Common for nav menus |
| Nested list | <ul><li>...<ul>...</ul></li></ul> | Sub-list inside li |
| Child element | <li> | Required for each item |
<ul> vs <ol>| Element | Marker | When to Use |
|---|---|---|
<ul> | Bullets (disc, circle, square) | Unordered collections, features, nav |
<ol> | Numbers, letters, Roman | Steps, rankings, sequences |
<li> | Child of both | Individual list item |
ul (unordered)
ol (ordered)
Use CSS instead of the obsolete type attribute to control bullet appearance:
ul.disc { list-style-type: disc; }
ul.circle { list-style-type: circle; }
ul.square { list-style-type: square; }
ul.none { list-style: none; padding-left: 0; }disc (default)
circle
square
The <ul> tag has no required tag-specific attributes in HTML5. The legacy type attribute (disc, circle, square) is obsolete—use CSS instead:
<!-- Legacy (obsolete) -->
<ul type="circle">
<li>Item A</li>
<li>Item B</li>
</ul>
<!-- Modern CSS approach -->
<ul class="circle-bullets">
<li>Item A</li>
<li>Item B</li>
</ul>class / id GlobalHook CSS selectors for custom bullet styles and layout.
class="nav-list"type ObsoleteLegacy values: disc, circle, square. Use CSS list-style-type instead.
list-style-type: circle;For new projects, CSS list-style-type is preferred over the obsolete type attribute, keeping HTML semantic and presentation in stylesheets.
Nest unordered lists within each other to create a hierarchical structure. Place the nested ul inside a parent li:
<ul>
<li>Fruits
<ul>
<li>Apple</li>
<li>Orange</li>
</ul>
</li>
<li>Vegetables
<ul>
<li>Carrot</li>
<li>Broccoli</li>
</ul>
</li>
</ul>Real-world unordered lists for features, categories, and grouped content.
Default unordered list with disc bullets:
Use <ul> for content where order does not matter—feature lists, ingredient groups, navigation links, and categorized items.
Display open-circle bullets using the legacy type attribute or modern CSS.
<ul type="circle">
<li>Item A</li>
<li>Item B</li>
<li>Item C</li>
</ul>The simplest form: a bullet list of related items such as fruits or features.
<ul>
<li>Apple</li>
<li>Orange</li>
<li>Banana</li>
</ul>Group related items under categories with sub-lists for a more organized structure.
<ul>
<li>Fruits
<ul>
<li>Apple</li>
<li>Orange</li>
<li>Banana</li>
</ul>
</li>
<li>Vegetables
<ul>
<li>Carrot</li>
<li>Broccoli</li>
<li>Spinach</li>
</ul>
</li>
</ul>li should be a complete, understandable point.li preserve logical hierarchy for assistive tech.ul with list-style: none for accessible menus.Open an unordered list container and add li children.
Disc, circle, or square markers appear based on CSS list-style-type.
Bullets group related points without implying a required order.
Readers browse grouped items without sequence confusion.
The <ul> tag is supported in all major browsers including Internet Explorer. No polyfills are needed.
Every browser renders <ul> and <li> with bullet markers. CSS list-style properties work in all modern browsers.
Bottom line: Use <ul> confidently for unordered content in any browser.
The HTML <ul> tag is a fundamental building block for organizing content on the web. Whether you are creating a simple feature list or a complex nested structure, mastering ul with li empowers you to craft well-structured, accessible pages.
ul and lilist-style-typeli concise and meaningfultype attributeli wrappers around list content<ul>Bookmark these before you build your next list.
<ul> groups items where order does not matter.
Every list entry must be wrapped in <li>.
Style markers with list-style-type, not obsolete type.
Bullets for unordered; numbers for sequences.
ComparisonSub-lists belong inside a parent li element.
<ul> element creates an unordered list where item order does not matter. Browsers display bullet markers for each li inside the list.ul uses bullet points for unordered collections. ol uses numbers or letters for ordered sequences.ul or ol inside an li element to create hierarchical sub-lists.list-style-type with values like disc, circle, square, or none. Avoid the obsolete type attribute.li element. Direct text as children of ul is invalid HTML.ul element is fully supported in all modern browsers and Internet Explorer.Practice <ul> and <li> markup in the Try It editor.
5 people found this page helpful