HTML and CSS Reference
In-Depth Information
.
Output
FIGURE 5.1
An ordered list in
HTML.
Customizing Ordered Lists
Attributes are a structural element of HTML that haven't been intro-
duced yet. They provide further information about a tag or modify the
behavior of a tag and take the form of an attribute name and, option-
ally, an attribute value. For example, all tags support the style
attribute. Here's what an attribute for an HTML element looks like:
<ul style=” insert style information here ”>
Since Cascading Style Sheets were introduced, HTML elements and
attributes that describe how the page should be displayed have been
migrating to CSS. HTML is now associated with describing the struc-
ture of a page's content—CSS is for indicating exactly how the page
should look in the browser. In discussing how to customize lists, I talk
about the old HTML attributes that were once used (and still work in
nearly all browsers), and the more current CSS approach to solving
the same problems.
The display attributes for ordered lists enable you to control several
features of the lists including which numbering scheme to use and
from which number to start counting (if you don't want to start at 1).
The attributes mentioned in this section are deprecated in favor of
using style sheet properties and that can accomplish the same task.
You may, however, see these attributes used in examples or in other
people's markup.
You can customize ordered lists in two main ways: the numbering
style and the number with which the list starts. The type attribute can
set the numbering style, or you can use the list-style-type CSS
property. Table 5.1 lists the numbering styles.
 
Search WWH ::




Custom Search