Page 86 - Code Craft Computer-7
P. 86
situations where the order of items is significant or where it is required to keep a count on the
number of items. For example , if the steps are not demonstrated orderly in a recipe, the end result
would not be as desired.
Attributes of <OL> Tag: Some commonly used attributes of <OL> tag are:
• Start Attribute: An ordered list automatically starts with number 1, but you can also start
the list with a different number with the help of the Start attribute.
For example , if you write Start = 101, the ordered list numbering will start from 101.
• Reversed Attribute: This attribute specifies that the list order should be in descending order.
For example , <OL Start=5 reversed>
<!DOCTYPE>
<HTML>
<HEAD>
<TITLE>TO-do List</TITLE>
<STYLE>
BODY{background- color : RGB (255,251,214)}
H2{color: red}
LI{color:green}
</STYLE>
</HEAD>
<BODY>
<H2>To-do List for Today</H2>
<OL Start=5 reversed>
<LI>Exercise
<LI>Buy groceries
<LI>Prepare presentation
<LI>Respond to emails
<LI>Pay bills
</OL>
</BODY> </HTML>
86

