What Is the Use of the "ul" HTML Element?

In HTML, "ul" stands for "unordered list". When you add the "<ul>" HTML element to a webpage, it creates a container element for an unordered list which can be used for grouping and displaying a list of related items.

The <ul> HTML element is typically paired with one or more "<li>" (list item) elements, which are used to define individual items within the list. Each <li> element represents a separate item in the list.

For example, the following HTML markup creates an unordered list with three list items:

<ul>
  <li>Item 1</li>
  <li>Item 2</li>
  <li>Item 3</li>
</ul>

The browser will typically display the list with bullet points, for example, like so:

  • Item 1
  • Item 2
  • Item 3

You can use CSS to further customize the appearance of the unordered list, such as changing the bullet style, adjusting the spacing, or applying different colors.


This post was published by Daniyal Hamid. Daniyal currently works as the Head of Engineering in Germany and has 20+ years of experience in software engineering, design and marketing. Please show your love and support by sharing this post.