What is HTML Unordered List?
In HTML, an unordered list is used to display a list of items as a list in a webpage without any particular order or sequence.
HTML <ul>
(unordered list) element is used to create an unordered list in a webpage.
<ul>
is the container element for the unordered list items.
<li>
(list item) element is used to represent each individual item within <ul>
element.
Example of Creating HTML Unordered List
Create an HTML unordered list element <ul></ul>
.
Add 5 list item elements (<li> </li>
) between <ul>
and </ul>
tags.
Add the text- Python, C#, Java, HTML, and CSS to the 5 list item elements respectively as shown in the following example:
Example of Unordered List
Output of the above example
An unordered list
- Python
- C#
- Java
- HTML
- CSS
Add type attribute with 'square' value (type="square"
) inside the opening ul
tag to add square type to the list elements.
Other types are disc, circle and none. Have a closer look at the output of the example.