Skip to: content, navigation

by Ian Lloyd

type (HTML attribute)

Browser support full matrix
IE5.5+ FF1+ Saf1.3+ Op9.2+
Partial Full Full Full
Spec
Depr. Version
Yes HTML 2
type=" { circle | disc | square | a | A | i | I | 1 } "

Example

The example below shows one item in an unordered list with the type set to "circle":

<ul>
  <li>Eggs</li>
  <li type="circle">Cheese</li>
  <li>Milk</li>
  <li>Papadums</li>
  <li>Tickle-me Elmo</li>
  <li>Dr Who Remote Control Dalek</li>
</ul>

Description

When the type attribute is applied to an li, it lets the web page author change the style of the glyph for this list item, overriding the style set with the type attribute at the parent ul or ol level, as shown in Figure 1.

Figure 1. Changing one list item glyph style using the type attribute One list item glyph style changed 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 (provided the li to which the type is applied is inside an ordered list, ol):

  • "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)

If the li in question is inside an unordered list (ul), the options are "disc" (the browser default: a filled circle), "circle" (an outline of a circle, not filled in), and "square" (a filled square, not an outline).

Compatibility

IE5.5Partial
6.0Partial
7.0Partial
Firefox1.0Full
1.5Full
2.0Full
Safari1.3Full
2.0Full
3.0Full
Opera9.2Full

Good support is provided for the type attribute, but given that it’s a deprecated attribute whose effects can be achieved using CSS, you should simply avoid using it.

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.

Related Products

The Principles of Beautiful Web Design

Best Seller!

You don’t need to go to Art School to design great looking web sites!

Book Cover: The Principles of Beautiful Web Design

Download the FREE sample chapters