top of page

CSS 04

CSS Lists

We use two main types of list in html.


Let's see how html list attributes are used in CSS.


How to Set different list item markers for ordered lists and unordered lists?

We using the list-style-type property specifies the type of list item marker.














Position of List Markers

We use list-style-position property to specify the position of list-item markers.




















An Image as The List Item Marker

We can also set the list-style-image property specifies an image as the list item marker.









Styling List with Colors

We can also style lists with colors, to make them look a little more interesting.





















Activity

Write a CSS code to generate the following list format with "Blue" color font.

Provinces of the Sri Lanka with respective Districts

A. Western

  • Gampaha

  • Colombo

B. Southern

o Galle

o Matara

C. Central

1. Matale

2. Kandy

D. Sabaragamuwa

a. Kegalle

b. Ratnapura

E. Northern

I. Jaffna

II. Kilinochchi




Tutorial Created By Dayani Kaushalya

Recent Posts

See All

Comentários


  • Facebook
  • Twitter
  • LinkedIn

©Powered by Department of Economics & Statistics 

bottom of page