Unordered List in HTML

An unordered list can be created by using the tag. By default, all unordered list items are marked with a bullet (.) symbol.

Unordered List in HTML

In HTML, an unordered list is used to group related items. An unordered list can be created by using the <ul> tag. By default, unordered list items are marked with a bullet symbol.

Example

<!DOCTYPE html>
<html>
<head>
    <title>Unodered List<title>
</head>
<body>
    <ul>
        <li>Apple</li>
        <li>Orange</li>
        <li>Grapes</li>
    </ul>  
</body>
</html>

Output

  • Apple
  • Orange
  • Grapes

Styling an unordered list

The list-style-type attribute of CSS can be used to apply different types of list item markers to the list.

Example – Disc

<ul style="list-style-type:disc">
  <li>Coffee</li>
  <li>Tea</li>
  <li>Milk</li>
</ul>

Example – Circle

<ul style="list-style-type:circle">
  <li>Coffee</li>
  <li>Tea</li>
  <li>Milk</li>
</ul>

Example – Square

<ul style="list-style-type:square">
  <li>Coffee</li>
  <li>Tea</li>
  <li>Milk</li>
</ul>

Example – None

<ul style="list-style-type:none">
  <li>Coffee</li>
  <li>Tea</li>
  <li>Milk</li>
</ul>

Other HTML List tags


Share Tweet Send
Loading...
You've successfully subscribed to Geekinsta
Great! Next, complete checkout for full access to Geekinsta
Welcome back! You've successfully signed in
Success! Your account is fully activated, you now have access to all content.