attribute name | possible values | meaning | notes |
---|---|---|---|
TYPE | DISC, SQUARE, CIRCLE | default bullet style for items | Not in HTML 2.0! |
COMPACT | COMPACT | reduced interim spacing | often ignored by browsers |
Both attributes are deprecated in HTML 4.0.
The default value of bullet type generally depends on the level of nesting (various) lists.
Remember to buy <UL> <LI> milk <LI> bread <LI> apples. </UL>A contrived example to show what the bullets may look like. Notice that TYPE attribute in a LI element overrides that of an enclosing UL element.
<UL TYPE=DISC COMPACT> <LI> disc <LI TYPE=SQUARE> square <LI TYPE=CIRCLE> circle </UL>See also Examples of various list elements in HTML.
If your list items contain numeric or alphabetic labels like 1, 2, 3, ... or a, b, c, ..., you should use an ordered list, the OL element (and remove those labels, since they are generated by a Web browser when OL is used).
A UL element must contain at least one LI element. Some people and some HTML editors may generate UL elements with just text within, possibly even nesting UL elements just in the hope of getting different amounts of indentation. If you have to resort to such tricks, enclose the text into an LI element (although this will usually cause a bullet in the display) and this in turn into UL. (Style sheets will provide mechanisms for controlling indentation.)