<ul type="bullet type">
<li> List Item
<li> List Item
<li> List Item
</ul>
ul
element. The ul
element employs a <ul>
start tag and and </ul>
end tag and must contain at least one or more list items which are placed in between. Each list item is preceded by a <li>
start tag of which the </li>
end tag is optional.The following is a bulleted or 'unordered' list of the kinds of lists you can create using HTML:
<ul>
<li> Unordered lists (bulleted)
<li> Ordered lists (numbered or alphabetized)
<li> Definition lists (term/definition format)
</ul>
type
attribute, you can specify what kind of "bullet type" to display in your list. The values you can use are disc
, circle
or square
. Here's an example displaying three lists containing one list item each and using different values for the type attribute:
<ul type="disc">
<li> Disc
</ul>
<ul type="circle">
<li> Circle
</ul>
<ul type="square">
<li> Square
</ul>
ul
element is a block element and initially behaves like a paragraph by separating itself from other lists (and block elements) with a line of blank space. The li
element is also a block element and hence may contain other block elements. Thus, if you really wanted to get adventurous, you could 'nest' one list inside the other, or in other words, have list items contain other lists.
<font size="4">
HTML LISTS AND STYLE TYPES</font>
<ul>
<li> <b>Unordered Lists
</b>
<ul>
<li> Disc bullet
<li> Circle bullet
<li> Square bullet
</ul>
<li> <b>Ordered Lists
</b>
<ul>
<li> Numbered
<ul>
<li> Decimal
<li> Lowercase Roman numeral
<li> Uppercase Roman numeral
</ul>
<li> Alphabetized
<ul>
<li> Lowercase
<li> Uppercase
</ul>
</ul>
<li> <b>Definition Lists
</b>
<ul>
<li> Term/Definition style
</ul>
</ul>
Maroon Bold
indicates a list at the top level (disc).
Green
indicates a second-level list (circle).
Red
indicates a third-level list (square).
Blue
indicates other HTML text formats.
type
attributes were specified in any of the lists in Example 3 then the main list and its subsequent nested lists display default bullet types which change according to how deep the respective list is nested. Hence, the main or 'top level' list defaults to disc
, the second level to circle
and the third level to square
.
Free Text Editors
Free Graphics Editors
Website Analysis Tools
Free Website Templates
See also:
If you need a .COM web address, you can get one quick and easy at...
INTRO | TOP | NEXT ~> |