Professional Documents
Culture Documents
Definition:
Lists are useful for conveying a set of either numbered or bulleted points.
Properties:
1. list-style-type
2. list-style-position
3. list-style-image
4. list-style
5. mmmarker-offset
The list-style-type property allows you to control the shape or style or appearence of a bullet
point (marker) in unordered lists and in the style of numbering in ordered lists.
Value Description
Example:
<ul style="list-style-type:circle;">
<li>Onion</li>
<li>Tomato</li>
<li>Potato</li>
</ul>
<ul style="list-style-type:square;">
<li>Onion</li>
<li>Tomato</li>
<li>Potato</li>
</ul>
<ol style="list-style-type:decimal;">
<li>Onion</li>
<li>Tomato</li>
<li>Potato</li>
</ol>
<ol style="list-style-type:lower-alpha;">
<li>Onion</li>
<li>Tomato</li>
<li>Potato</li>
</ol>
<ol style="list-style-type:upper-roman;">
<li>Onion</li>
<li>Tomato</li>
<li>Potato</li>
</ol>
Output:
Value Description
inside If the text goes onto a second line, the text will wrap underneath the marker.
outside If the text goes onto a second line, the text will be aligned with the start of the first
line
Example:
<li>Onion</li>
<li>Tomato</li>
<li>Potato</li>
</ul>
<ul style="list-style-type:square;list-style-position:inside;">
<li>Onion</li>
<li>Tomato</li>
<li>Potato</li>
</ul>
<ol style="list-style-type:upper-romanl;list-stlye-position:outside;">
<li>Onion</li>
<li>Tomato</li>
<li>Potato</li>
</ol>
<ol style="list-style-type:lower-alpha;list-style-position:inside;">
<li>Onion</li>
<li>Tomato</li>
<li>Potato</li>
</ol>
Output:
The list-style-image is used to specify an image so that you can use your own bullet style.
Value:
url starting the value of the property followed by the URL in brackets. If it does not find the
given image then default bullets are used.
Example:
<ul>
<li style="list-style-image: url(sqpurple.gif);">Onion</li>
<li>Tomato</li>
<li>Potato</li>
</ul>
<ol>
<li>Tomato</li>
<li>Potato</li>
</ol>
Output:
The list-style is used to specify all the list properties into a single expression.
Example:
<li>Tomato</li>
<li>Potato</li>
</ul>
<li>Onion</li>
<li>Tomato</li>
<li>Potato</li>
</ol>
<ol>
<li>Tomato</li>
<li>Potato</li>
</ol>
Output:
The marker-offset Property
The marker-offset property allows you to specify the distance between the marker and the text
which is relating to that marker.
Value:
Length.
Example:
<li>Onion</li></li>
<li>Tomato</li>
<li>Potato</li>
</ul>
<li>Onion</li>
<li>Tomato</li>
<li>Potato</li>
</ol>
Output: