- HTML Tutorial
- HTML Introduction
- HTML Editors
- HTML Basic
- HTML Comments
- HTML Elements
- HTML Attributes
- HTML Id & Classes
- HTML Skeletal Tags
- HTML Heading Tags
- HTML Paragraph Tag
- HTML Line Break Tag
- HTML Pre Tag
- HTML Anchor Tag
- HTML Image Tag
- HTML Horizontal Line Tag
- HTML Inline & Block
- HTML Inline
- HTML Block
- HTML LInks
- HTML Images
- HTML Formatting
- HTML Head
- HTML Head
- HTML Title
- HTML Meta Elements
- HTML Favicon
- HTML Style
- HTML List
- HTML Lists
- HTML Unordered List
- HTML Ordered List
- HTML Description List
- HTML Table
- HTML Tables
- HTML Table Headers
- HTML Table Styling
- HTML Table Colgroup
- HTML Form
- HTML Forms
- HTML Form Elements
- HTML Form Attributes
- HTML Input Types
- HTML Input Attributes
- HTML Form Actions
- HTML Semantic
- HTML Semantics
- HTML Graphics & Media
- HTML Canvas
- HTML SVG
- HTML Video & Audio
- HTML Plug-ins
- iFrames in HTML
- HTML Miscellaneous Tags
- HTML Code Tag
- HTML Entities
- HTML Quotation
- HTML Global Attributes
- HTML Obsolete Tags
- HTML Emojis
- HTML Symbols
- HTML Events
- HTML Colors
HTML Unordered List
An HTML unordered list (<ul>) is a semantic element used to group a collection of related items where the specific sequence doesn't change the meaning of the content. Think of a grocery list or a list of features on a product page; it doesn't matter if "Milk" comes before "Bread." By default, browsers display these items with a simple bullet point (a small black dot) to visually separate them.
Creating an Unordered List
Building a list requires a parent-child relationship between two different tags. The <ul> tag acts as the container (the parent), while each individual item is wrapped in an <li> (list item) tag (the children).
Basic Syntax
<ul>
<li>Item one</li>
<li>Item two</li>
<li>Item three</li>
</ul>
Output:
- Item one
- Item two
- Item three
Types of Bullet Points
While the default bullet is a solid dot, the list-style-type CSS property gives you control over the visual marker. Although you can use inline styles (as shown below), in professional projects, you would typically define these in an external CSS file.
1. Disc (default)
The "disc" is the standard solid bullet point used by all modern browsers if no other style is specified.
<ul style="list-style-type: disc;">
<li>Item one</li>
<li>Item two</li>
<li>Item three</li>
</ul>
Output:
- Item one
- Item two
- Item three
2. Circle
The "circle" style creates an unfilled, hollow round marker.
<ul style="list-style-type: circle;">
<li>Item one</li>
<li>Item two</li>
<li>Item three</li>
</ul>
Output:
â—‹ Item one
â—‹ Item two
â—‹ Item three
3. Square
The "square" style uses a solid rectangular block as the marker.
<ul style="list-style-type: square;">
<li>Item one</li>
<li>Item two</li>
<li>Item three</li>
</ul>
Output:
â– Item one
â– Item two
â– Item three
list-style-type: none; in your CSS.
Nesting Unordered Lists
Nesting is the process of putting one list inside another. This is the standard way to create multi-level navigation menus or detailed outlines. To nest correctly, the second <ul> must be placed inside an <li> tag of the parent list.
<ul>
<li>Fruits
<ul>
<li>Apple</li>
<li>Banana</li>
</ul>
</li>
<li>Vegetables
<ul>
<li>Carrot</li>
<li>Broccoli</li>
</ul>
</li>
</ul>
Output:
- Fruits
- Apple
- Banana
- Vegetables
- Carrot
- Broccoli
Customizing Bullet Points
You can apply styles to the entire list or target specific list items to mix and match markers. This is useful for creating legend-style lists or emphasizing specific entries.
<ul style="list-style-type: none;">
<li style="list-style-type: disc;">Item one</li>
<li style="list-style-type: circle;">Item two</li>
<li style="list-style-type: square;">Item three</li>
</ul>
Output:
- Item one
- Item two
- Item three
::before pseudo-element or list-style-image to use custom SVG icons or emojis as your bullets.
Summary
HTML unordered lists (<ul>) are a fundamental tool for grouping items logically and semantically. By mastering the parent-child relationship between <ul> and <li>, you can create everything from simple bulleted notes to complex, multi-level dropdown menus. Remember to use the list-style-type property to control the appearance, and always ensure your nesting is syntactically correct for the best accessibility and SEO results.