type (HTML attribute)
Example
This example shows the
type attribute applied to the maintenance steps
shown earlier:
<ol type="i">
<li>Remove the outer casing by pushing the plastic rivets
through.</li>
<li>Disconnect the main power harness from the inner unit
(unclip).</li>
<li>Remove connection to the glow plug.</li>
<li>Extract unit, keeping upright at all times.</li>
</ol>
Description
The type
attribute lets the web page author change the style of the numbering
(browsers generally begin list numbering at 1, and increase the number by
1 with each new li).
For example, a
type of "i" would appear on
screen as shown in Figure 1.
ol using the type
attribute
This attribute is now deprecated, and is highly presentational in its nature. The desired visual effects can all be achieved with CSS and, as such, this attribute shouldn’t be used—it’s presented here for informational purposes only.
Value
This attribute’s value options, and their rendering of the first ten list items, are as follows:
"a": a, b, c, d, e, f, g, h, i, j"A": A, B, C, D, E, F, G, H, I, J"i": i, ii, iii, iv, v, vi, vii, viii, ix, x"I": I, II, III, IV, V, VI, VII, VIII, IX, X"1": 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 (default)
Compatibility
| IE | 5.5 | Full |
|---|---|---|
| 6.0 | Full | |
| 7.0 | Full | |
| Firefox | 1.0 | Full |
| 1.5 | Full | |
| 2.0 | Full | |
| Safari | 1.3 | Full |
| 2.0 | Full | |
| 3.0 | Full | |
| Opera | 9.2 | Full |
Good support is
provided for the type attribute, but given that
it’s a deprecated attribute, and the effects can be achieved using CSS,
you should simply avoid using it altogether.
User-contributed notes
There are no comments yet.
Add a note
To post a note on this topic, please log in with your SitePoint username and password. If you don't have an account yet, you can create a new account for free.

