How to create an unordered list in HTML

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.

Example of Unordered List With Type Attribute


Output of the above example

An unordered list with square type.

  • Python
  • C#
  • Java
  • HTML
  • CSS

Live Code Playground

In the following HTML code editor, you can practice the above code by creating more new HTML unordered list with your preferred items. Click on the 'Run Code' button to render the code; the rendered page will be displayed in the following HTML Code Output frame. Practice until you become comfortable and proficient with your code.

HTML logo HTML Online Editor
HTML Code Output