There are two types of lists in HTML coding but you can control its appearance with the help of CSS Style Sheet. You can do this in one declaration with css. Actually you can control the style of ordered and un-ordered list with style sheet.
2 Types of Lists
- Ordered List
- Un-Ordered List
Examples of ordered list are as follows:-
1,2,3,4,5,6,7...and so on
a,b,c,d,e...and so on
i, ii, iii, iv, v...and so on
I, II, III, IV, V...and so on
A, B, C, D, E...and so on
Above 5 are examples of ordered list and can be modified with the help of style sheet coding.
Examples of ordered list are as follows:-
o, >, *,#... and so on are the examples of un-ordered list. You can control the list style and set to none if not required with the element of list.
List Style
There are 3 values to control the list style:-- Image
- Position
- Type
Example for List Style:-
/* Syntax of List Style in CSS*/
list-style:value;
list-style:value;
List Type
Did you know that you can use an image for the bullet of unordered lists with the list-style property?
Example for List Style Type:-
/* Syntax of List Type in CSS*/
list-style-image:url(myimage.jpg);
list-style-image:url(myimage.jpg);
List Style Position
The control of list position is in your hands. If you are using List Style Position in style sheet coding.
There are 2 values of list style position:-
There are 2 values of list style position:-
- Inside
- Outside
Example for List Style Position:-
/* Syntax of List Position in CSS*/
list-style-position:value;
list-style-position:value;
List Style Type
The control of ordered and unordered list can be controlled with the help of list-style-type in css coding.
There are 9 values of list style type:-
There are 9 values of list style type:-
- None
- Disc
- Circle
- Square
- Decimal
- Lower Roman
- Upper Roman
- Lower Alpha
- Upper Alpha
Example for List Style Type:-
/* Syntax of List Style Type in CSS*/
list-style-type:value;
list-style-type:value;
NOTE:- For proper use of List Style Type Properties, read posts on each topic in the next section of this blog.
0 comments:
Post a Comment