CSS List

CSS used three types of list styling:

  • Unordered lists — A list of items, where every list items are marked with bullets.

  • Ordered lists — A list of items, where each list items are marked with numbers.

  • Definition list — A list of items, with a description of each item.




       ul {

          list-style-type: square;


      ol {

          list-style-type: upper-roman;


Used inside another list:


       ul.in li {

          list-style-position: inside;


      ul.out li {

        list-style-position: outside;



Using the image as a marker:


      <style type="text/css">

       ul li {

            list-style-image: url("/examples/images/arrow.png");





Selector of CSS

Two types of selector used in CSS:

Id selector:

Used (#) sign to select id


         color: red;


Class selector:

Use period sign (.) to select class:

   .h1 {

        color: blue;


Other many selectors are used which is given below:

  • Adjacent Sibling Selectors

  • Child Selectors

  • General Sibling Selectors

  • Grouping Selectors

  • Universal selectors