The HTML <ul> tag is used to create unordered lists in HTML. An unordered list displays a bulleted list of items where the order of the items is not important.
Here's the basic structure of the <ul> tag:
<ul>
<!-- list items -->
</ul>
To define the individual items within the unordered list, you use the <li> (list item) tag. Each <li> tag represents a separate item in the list.
Example usage:
<ul>
<li>First item</li>
<li>Second item</li>
<li>Third item</li>
</ul>
In this example, an unordered list is created with three list items (<li> tags). When rendered in a web browser, the list items will be displayed with bullet points.
You can customize the appearance of the unordered list by applying CSS styles. For example, you can change the type of bullet point, add custom images as bullet points, or remove the bullet points altogether.
Example usage with custom bullet point style:
<ul style="list-style-type: square;">
<li>First item</li>
<li>Second item</li>
<li>Third item</li>
</ul>
In this example, the style attribute is added to the <ul> tag with a CSS rule to change the bullet point style to squares.
Unordered lists are useful for presenting information where the order of the items is not significant, such as lists of features, benefits, options, and more. Use the <ul> tag when you want to display a bulleted list of items without a specific order.