CSS List Code Tutorial

CSS list properties allow you to place the list-item marker, choose between different list-item markers and/or set an image as the list-item marker.

The below HTML and CSS code example shows you the different list-item markers that are allowed in CSS.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
<title>this is the title of the web page</title>

<style type="text/css">

ul.disc {list-style-type: disc;}
ul.circle {list-style-type: circle;}
ul.square {list-style-type: square;}
ul.none {list-style-type: none;}


</style>

</head>
<body>
<ul class="disc">
<li>CSS</li>
<li>HTML</li>
<li>tutorial</li>
</ul>

<ul class="circle">
<li>CSS</li>
<li>HTML</li>
<li>tutorial</li>
</ul>

<ul class="square">
<li>CSS</li>
<li>HTML</li>
<li>tutorial</li>
</ul>

<ul class="none">
<li>CSS</li>
<li>HTML</li>
<li>tutorial</li>
</ul>
</body>
</html>