Definition
The <ul>
HTML element is used to create an unordered list in a web page. It represents a list of items where the order of the items is not important. Each item in the list is represented by an <li>
element, which stands for “list item”.
Here’s an example of how to use the <ul>
element:
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>
In this example, the <ul>
element wraps three <li>
elements, creating an unordered list with three items. The order of the items does not matter, and they are typically rendered with a bullet point or some other marker by default.
The <ul>
element can contain any number of <li>
elements, each representing an item in the list. These items can include text, images, links, or other HTML elements.
You can style the appearance of the unordered list using CSS to change the marker style, spacing, or other visual properties.
It’s worth noting that the <ul>
element is just one way to create a list in HTML. There is also the <ol>
element for ordered lists, where the order of the items is important and represented by numbers or letters.