HTML Lists


Unordered List (<ul>)

An unordered list is used to group a set of related items in no particular order. Each item in the list is marked with a bullet point by default.

Example:

Ordered List (<ol>)

An ordered list is used to group a set of related items in a specific sequence. Each item in the list is marked with a number or letter by default.

Example:

  1. Install a code editor
  2. Create your first HTML file
  3. Open in a browser

Nested Lists

Nested lists are lists within lists. You can create a nested list by placing a new list (either ordered or unordered) inside a list item (<li>) of another list. This creates a hierarchical structure, where each sublist is indented to visually represent its relationship to the parent list item.

The Purpose: To organize information in a clear and structured manner, making it easier for users to read and understand. Lists are commonly used for navigation menus, feature lists, and any content that benefits from a structured format.

Back to top