How to create an unordered list with circle bullets in HTML?


An unordered list is unordered list of items marked with bullets, circle, disc and square. It gives you the ability to control the list in the context. Allow us to group a set of related items in lists.

HTML support ordered list, unordered list and we have to use the <ul> tag, to create unordered list in HTML. The <ul> tag defines the unordered list. We use <li> tag to start list of items. The list of items can be marked as bullets, square, disc and circle.

By default, the list items in the context marked with the bullets.

  • The <li> tag should be placed inside the <ul> tag to create the list of items.

  • We use type attribute of the <ul> tag, for creating an unordered list with numbers.

  • We use CSS list-style-type property to define the style of the unordered list items.

Syntax

Following is the syntax to create an unordered list with circle bullets in HTML.

<ul style="list-style-type: circle">
   <li>Item in list…</li>
   <li>Item in list…</li>
   <li>Item in list…</li>
</ul>

Example 1

Given below is an example to create an unordered list with circle bullets in HTML.

<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> </head> <body> <ul style="list-style-type: circle"> <li>Abdul</li> <li>Jason</li> <li>Yadav</li> <li>Saiteja</li> <li>Akshaj</li> <li>Tharun</li> </ul> </body> </html>

Following is the output for the above example program.

Example 2

An example to create an unordered list with circle bullets in HTML is implemented below.

<!DOCTYPE html> <html> <head> <title>HTML Unordered List</title> </head> <body> <h1>Developed Countries</h1> <p>The list of developed countries:</p> <ul style="list-style-type:disc"> <li>US</li> <li>Australia</li> <li>New Zealand</li> </ul> </body> </html>

After executing the above HTML script, the output is obtained as −

Updated on: 18-Oct-2022

8K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements