HTML Unordered List (<ul>):

The HTML Unordered List (<ul>) element is used to create lists where the order of items is not significant. Unordered lists are commonly employed when presenting information in a bulleted or visually separated format.


Here's a detailed guide on using the HTML Unordered List:
  1. Basic Syntax:
    • The (<ul>) element is used to create an unordered list.
    • List items within the unordered list are defined with the(<li>) (list item) element.
    <ul>
     <li>First Item</li>
     <li>Second Item</li>
     <li>Third Item</li>
     </ul>
    Output:-
    • First Item
    • Second Item
    • Third Item
  2. List Styles:
    • Unordered lists typically display items with bullet points by default.
    • The exact appearance of the bullet points can vary depending on the browser and the default styles applied by the browser.

  3. List Item Nesting:
    • Unordered lists can be nested inside other list items to create a hierarchical structure.
     <ul>
        <li>Main Item 1
            <ul>
                <li>Sub-item A</li>
                <li>Sub-item B</li>
            </ul>
        </li>
        <li>Main Item 2</li>
    </ul>
    Output:-
    • Main Item 1
      • Sub-item A
      • Sub-item B
    • Main Item 2

  4. List Item Nesting:
    • Unordered lists can be nested inside other list items to create a hierarchical structure.
     <ul>
        <li>Main Item 1
            <ul>
                <li>Sub-item A</li>
                <li>Sub-item B</li>
            </ul>
        </li>
        <li>Main Item 2</li>
    </ul>
    Output:-
    • Main Item 1
      • Sub-item A
      • Sub-item B
    • Main Item 2

Example:
<!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Unordered List Example</title>
    </head>
    <body>
        <h1>Bulleted List Example</h1> 
      <ul>
        <li>Item A</li>
        <li>Item B</li>
        <li>Item C</li>
    </ul>
    </body>
    </html>    
Output:-

Bulleted List Example

  • Item A
  • Item B
  • Item C