CSS Lists

There are two types of lists in HTML.

  1. Unordered lists (<ul>) : Unordered lists are marked with bullets.
  2. Ordered lists (<ol>) : are marked with numbers or alphabet.

CSS Lists properties are used to style HTML lists Element. CSS Lists properties can be used to control lists as below.

  • list-style: It is a shorthand property. It can be used to set all the list properties in one declaration.
  • list-style-image: Specify an image for the marker instead of using the number or bullet point.
  • list-style-position: Set the position of the list-item markers (bullet points). Specify the marker outside or inside the box that contains the list items.
  • list-style-type: Set shape or appearance of the marker.

Syntax :

list-style:circle;
list-style-image:none;
list-style-position:inside;
list-style-type:decimal;

CSS Lists Example :

<html>
<head>
    <title>Learn Css Lists tutorials by aryatechno</title>
    <style>
     ul li{
     list-style-type:circle;
     list-style-position:outside;
    }
    </style>
</head>
<body>
  <ul>
     <li>PHP</li>
     <li>CSS</li>
     <li>MYSQL</li>
     <li>JAVa</li>
  </ul>
 </body>
</html>

Output :

  • PHP
  • CSS
  • MYSQL
  • JAVa

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

49454