type (HTML attribute)

Spec
Depr. Version
Yes HTML 2
Browser support (more…)
IE5.5+ FF1+ SA1.3+ OP9.2+ CH2+
Full Full Full Full Full

Syntax

type=" { a | A | i | I | 1 } "

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.

Figure 1. Changing the format of the numbers presented for an ol using the type attribute example of ordered list styled with i, ii, iii etc

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.

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>

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

Internet Explorer Firefox Safari Opera Chrome
5.5 6.0 7.0 8.0 1.0 1.5 2.0 3.0 3.5 1.3 2.0 3.1 4.0 9.2 9.5 10.0 2.0
Full Full Full Full Full Full Full Full Full Full Full Full Full Full Full Full Full

Every browser listed supports this attribute.

User-contributed notes

There are no comments yet.

Related Products