An unordered list is a list of items where each item is marked with a bullet point or other symbol. To create an unordered list, use the <ul>
element. Each item in the list is marked with the <li>
(list item) element.
Here’s an example:
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>
This will create an unordered list with three items, each marked with a bullet point.
You can also change the appearance of the bullet points using CSS. Here’s an example:
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>
<style>
ul {
list-style-type: square; /* change bullet points to squares */
}
</style>
This will change the bullet points in the unordered list to squares. There are many other types of list-style-type that you can use to change the appearance of the bullet points. Some of the other values you can use include circle
, disc
, decimal
, and lower-alpha
.