0% found this document useful (0 votes)
1 views9 pages

HTML Unordered Lists

The document explains how to create unordered lists in HTML using the <ul> and <li> tags, with examples demonstrating different list item markers like disc, circle, and square. It also covers nesting lists and styling them with CSS for horizontal display. Additionally, it provides a summary of relevant HTML list tags and their descriptions.

Uploaded by

josephsani730
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views9 pages

HTML Unordered Lists

The document explains how to create unordered lists in HTML using the <ul> and <li> tags, with examples demonstrating different list item markers like disc, circle, and square. It also covers nesting lists and styling them with CSS for horizontal display. Additionally, it provides a summary of relevant HTML list tags and their descriptions.

Uploaded by

josephsani730
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

10/4/25, 7:40 AM HTML Unordered Lists

 Tutorials  References  Exercises  Get Certified

HTML
 CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO [Link] C

HTML Unordered Lists


❮ Previous Next ❯

The HTML <ul> tag defines an unordered (bulleted) list.

Unordered HTML List


An unordered list starts with the <ul> tag. Each list item starts with the <li> tag.

The list items will be marked with bullets (small black circles) by default:

Example

<ul>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>

Try it Yourself »

Unordered HTML List - Choose List Item


Marker
[Link] 1/9
10/4/25, 7:40 AM HTML Unordered Lists

The CSS list-style-type property is used to define the style of the list item marker. It
 Tutorials  References 
can have one of the following values:
Exercises  Get Certified

HTML
 CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO [Link] C
Value Description

disc Sets the list item marker to a bullet (default)

circle Sets the list item marker to a circle

square Sets the list item marker to a square

none The list items will not be marked

Disc

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

Try it Yourself »

Circle

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

Try it Yourself »

[Link] 2/9
10/4/25, 7:40 AM HTML Unordered Lists

 Tutorials 
Square
References  Exercises  Get Certified

HTML
 CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO [Link] C

Example - Square

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

Try it Yourself »

No List Marker

Example - None

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

Try it Yourself »

REMOVE ADS

Nested HTML Lists


Lists can be nested (list inside list):

Example
[Link] 3/9
10/4/25, 7:40 AM HTML Unordered Lists

<ul><li>Coffee</li>
Tutorials  References  Exercises  Get Certified

<li>Tea
HTML
 CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO [Link] C
<ul>
<li>Black tea</li>
<li>Green tea</li>
</ul>
</li>
<li>Milk</li>
</ul>

Try it Yourself »

Note: A list item ( <li> ) can contain a new list, and other HTML elements, like images and
links, etc.

Horizontal List with CSS


HTML lists can be styled in many different ways with CSS.

One popular way is to style a list horizontally, to create a navigation menu:

Example
<!DOCTYPE html>
<html>
<head>
<style>
ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #333333;
}

li {

[Link] 4/9
10/4/25, 7:40 AM HTML Unordered Lists

float: left;
 } Tutorials  References  Exercises  Get Certified

HTML
 li a CSS
{ JAVASCRIPT SQL PYTHON JAVA PHP HOW TO [Link] C
display: block;
color: white;
text-align: center;
padding: 16px;
text-decoration: none;
}

li a:hover {
background-color: #111111;
}
</style>
</head>
<body>

<ul>
<li><a href="#home">Home</a></li>
<li><a href="#news">News</a></li>
<li><a href="#contact">Contact</a></li>
<li><a href="#about">About</a></li>
</ul>

</body>
</html>

Try it Yourself »

Tip: You can learn much more about CSS in our CSS Tutorial.

Chapter Summary
Use the HTML <ul> element to define an unordered list
Use the CSS list-style-type property to define the list item marker
Use the HTML <li> element to define a list item
Lists can be nested
List items can contain other HTML elements
[Link] 5/9
10/4/25, 7:40 AM HTML Unordered Lists

Use the CSS property float:left to display a list horizontally


 Tutorials  References  Exercises  Get Certified

HTML
 CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO [Link] C

HTML List Tags


Tag Description

<ul> Defines an unordered list

<ol> Defines an ordered list

<li> Defines a list item

<dl> Defines a description list

<dt> Defines a term in a description list

<dd> Describes the term in a description list

For a complete list of all available HTML tags, visit our HTML Tag Reference.

❮ Previous Next ❯

[Link] 6/9
10/4/25, 7:40 AM HTML Unordered Lists

 Tutorials  References  Exercises  Get Certified

HTML
 CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO [Link] C

COLOR PICKER

 

REMOVE ADS

ADVERTISEMENT

ADVERTISEMENT

 

[Link] 7/9
10/4/25, 7:40 AM HTML Unordered Lists

 Tutorials  References  Exercises  Get Certified

HTML
 CSS
 JAVASCRIPT
PLUS
SQL PYTHON
SPACES
JAVA PHP HOW TO [Link] C

GET CERTIFIED FOR TEACHERS

FOR BUSINESS CONTACT US

Top Tutorials
HTML Tutorial
CSS Tutorial
JavaScript Tutorial
How To Tutorial
SQL Tutorial
Python Tutorial
[Link] Tutorial
Bootstrap Tutorial
PHP Tutorial
Java Tutorial
C++ Tutorial
jQuery Tutorial

Top References
HTML Reference
CSS Reference
JavaScript Reference
SQL Reference
Python Reference
[Link] Reference
Bootstrap Reference
PHP Reference
HTML Colors
Java Reference
AngularJS Reference
jQuery Reference

Top Examples Get Certified


HTML Examples HTML Certificate
CSS Examples CSS Certificate
JavaScript Examples JavaScript Certificate
How To Examples Front End Certificate
SQL Examples SQL Certificate
Python Examples Python Certificate
[Link] Examples PHP Certificate
Bootstrap Examples jQuery Certificate
PHP Examples Java Certificate
Java Examples C++ Certificate
XML Examples C# Certificate
jQuery Examples XML Certificate

[Link] 8/9
10/4/25, 7:40 AM HTML Unordered Lists

 Tutorials  References  Exercises  Get Certified

HTML
 CSS JAVASCRIPT SQL
 PYTHON
  JAVA
 PHP HOW TO [Link] C

FORUM ABOUT ACADEMY


W3Schools is optimized for learning and training. Examples might be simplified to improve reading and
learning.
Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full
correctness
of all content. While using W3Schools, you agree to have read and accepted our terms of use, cookie and
privacy policy.

Copyright 1999-2025 by Refsnes Data. All Rights Reserved. W3Schools is Powered by [Link].

[Link] 9/9

You might also like