Skip to content

8. Lists

Deepak Kumar edited this page Jul 28, 2020 · 3 revisions

There are 2 types of lists:

●Ordered List

●Unordered List.

Ordered List

You can use the <ol></ol> tag to create an ordered list and to create list items you can use <li></li> tags.

Ordered Lists have a sequence. This sequence can be:

●Numbers: 1, 2, 3,....

●Uppercase Alphabets: A, B, C, ...(upper-alpha)

●Lowercase Alphabets: a, b, c, ...(lower-alpha)

●Uppercase Roman Numerals: I, II, III, IV, ...(upper-roman)

●Lowercase Roman Numerals: i, ii, iii, iv, ...(lower-roman)

We can change this sequence by using the CSS property “list-style-type” or a property “type”.

Ex:- <ol style="list-style-type:upper-alpha" ></ol>

Ex:- <ol type="A" ></ol>

Unordered List

Unordered Lists have NO sequence. They are more like bullet points.You can use the <ul></ul> tag to create an unordered list and to create list items you can use &ltli></li> tags.The unordered list also has different styles:

●Disc

●Square

●Circle

●None

We can change this sequence by using the CSS property “list-style-type”

Ex:- <ul style="list-style-type:disk" ></ul>

Clone this wiki locally