FIGURE 4.4
AN ORDERED LIST IN HTML.
CUSTOMOZING ORDERED LISTS.
The HTML 3.2 recommendation described several attributed for ordered lists. They were used to customize ordered lists. these attributes enabled you to control several features of ordered lists including which numbering scheme to use and from which number to start counting (if you don’t want to start at 1 ). In HTML 4.01 and XHTML 1.90, the attributes mentioned in this section are d deprecated in favor of using style sheet properties and values that accomplish the same task. To support older browsers, however, you might need to use these attributes on occasion.
Attributes are extra parts of HTML tags that contain options or other information about the tag itself. To comply with the XHTML specification, you must include a value for every attribute, and enclose those values in quotation marks.
You can customize ordered lists in two main ways: how they’re numbered and the number with which the list starts. HTML 3.2 provides the type attribute that can take one of five values to define which type of numbering to use on the list.
· “1” –specifies that standard Arabic numerals should be used to number the list (that is, 1,2,3,4, an so on)
· “a” –specifies that lowercase letters should be used to number the list (that is, a , b, c, d, and so on)
· “1”- specifies that lowercase roman numerals should be used to number the list (that 8is, I, II, II, IV. And so on)
· “I” –specifies that uppercase roman numerals should be used to number the list
(that is , I, II, III, IV, and so on)
(that is , I, II, III, IV, and so on)
You can specify types of numbering in the <o1> tag, as follows: <o1> type=”a”>. By default, type=”1” is assumed.
NOTE
The nice thing about web browsers is that they generally ignore attributes they don’t understand. If a browser didn’t support the type attribute of the <o1> tag, for example, it would simple ignore it when it’s encountered.
As an example, consider the following list:
<p> the days of the week in French: <p/>
<o1>
<1i> Lundy </1i>
<1i> mardi</1i>
<1i>mercredi</1i<>
<1i>jeudi</1i>
<1i>vended</1i>
<1i>samedi</1i>
<1i>dimanche</1i>
</o1>
If you were to add type =:I” to the <o1> tag, as follows, it would appear in a browser as shown in figure .4.5
INPUT
<p> the days of the week in French: <p/>
<o1> type=”I”
<1i> Lundy </1i>
<1i> mardi</1i>
<1i>mercredi</1i<>
<1i>jeudi</1i>
<1i>vended</1i>
<1i>samedi</1i>
<1i>dimanche</1i>
</o1>
No comments:
Post a Comment