HTML and CSS Reference
In-Depth Information
all the <li> tags contained within that list. This makes it much easier to
define lists with a particular appearance.
For example, suppose you want to create a list style that uses lowercase
Roman numerals. One way is to define a class of the <li> tag with the
appropriate list-style-type defined:
li.roman {list-style-type: lower-roman}
Within your list, you'll need to specify each list element using that class:
<ol>
<li class=roman>Item one
<li class=roman>Item two
<li class=roman>And so forth
</ol>
Having to repeat the class name is tedious and error-prone. A better
solution is to define a class of the <ol> tag:
ol.roman {list-style-type: lower-roman}
Any <li> tag within the list inherits the property and uses lowercase Ro-
man numerals:
<ol class=roman>
<li>Item one
<li>Item two
<li>And so forth
</ol>
 
Search WWH ::




Custom Search