HTML Unordered List

An unordered list is a list of items that are not arranged in any specific, sequential order. Unlike ordered lists, the items in an unordered list are typically marked with bullet points, dashes, or other symbols to indicate list membership, but these markers do not imply any particular order.



Syntax for Creating Unordered Lists

cwh tutorial image

Key Characteristics of Unordered Lists

  • No specific sequence is required.
  • Typically displayed as bullet points.
  • Defined using the <ul> tag.
  • Individual items use the <li> tag.

Basic Example

Explain
<ul> <li>Pen</li> <li>Pencil</li> <li>Eraser</li> </ul>

Output:

  • Pen
  • Pencil
  • Eraser

Customizing Bullet Points with 'type' Attribute

You can specify the style of bullet points using the type attribute. It supports three values:

  • disc - default bullet style
  • square
  • circle

Example Using Square Bullets:

Explain
<ul type="square"> <li>Notebook</li> <li>Marker</li> </ul>

Output:

cwh tutorial image