Nested and Description List
Nested and Description List
To enhance the Ordered list we use three attributes along with <ol> tag.
2.List style image-This property you can specify an image as the list
item marker.
Syntax : list –style-image:value
Where value = url(“path of the image “)|none
3.List style position – It is used to specify the position of the list marker,
to make them appear inside or outside the content
4.List style – This is the shorthand property wherein all the list
properties in one declaration.
Syntax : list-style:value
Nested List
A nested list is a list inside any other list.
For example:
1. Fat Soluble Vitamins
• Vitamin a
• Vitamin d
2. Water-Soluble Vitamins
• Vitamin –B1
• Vitamin-B2
<html>
<body>
<h1>A list inside another list</h1>
<ul>
<li>Coffee</li>
<li>Tea
<ul>
<li>Black tea</li>
<li>Green tea</li>
</ul>
</li>
<li>Milk</li>
</ul>
</body>
</html>
Description List
It consist of a term followed by its definition.
Tags used are:-
<dl> &</dl>:- To start and end the definition list
<dt>&</dt>:- To define the terms or names
<dd>&</dd>:-To help in describing each term or name
Let us understand description list with the help of an example:-