CSS Lists

Whenever you need to mention a list of items, you need a tool which allows you to list out all items that you consider are important. In CSS you can specify a list of items, in the form of an ordered list, or in the form of an unordered list.

 

If you wish to specify an ordered list, you need to use ‘ol’ in the coding. Here is a look at how this goes:

 

ol { list-style-type: upper-alpha; }

 

The output of this is as follows:

 

A  Red

B  Green

C Orange

D Blue

 

If you wish to specify an unordered list, you need to use ‘ul’ in the coding. Here is a look at how this goes:

 

ul { list-style-type: circle; }

 

The output of this is as follows:

 

Red

Green

Orange

Blue

 


You can also specify you own image for your listing. Here is a look at how this goes:

 

ul { list-style-image: url(“firstlisting.gif”); }

 

§         – This is the image in firstlisting.gif

 

The output of this is as follows

 

§         Red

§         Green

§         Orange

§         Blue

 

You can also specify you own image for your listing. Here is a look at how this goes:

 

ol { list-style-image: url(“secondlisting.gif”); }

 

*      – This is the image in secondlisting.gif

 

The output of this is as follows

 

*      Red

*      Green

*      Orange

*      Blue

Comments on this entry are closed.

css.php