0% found this document useful (0 votes)
5 views

Nested and Description List

Uploaded by

games.of.pulkit
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Nested and Description List

Uploaded by

games.of.pulkit
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Attributes of Ordered List

To enhance the Ordered list we use three attributes along with <ol> tag.

1.Start Attribute:- An ordered list automatically starts with number 1,


but you can also start the list with a different number using start
attribute.
Syntax :- <ol start = 3>

2. Reversed: - It specifies that the list order should be descending.


Syntax:- <ol start = 3 reversed>
Attribute of Ordered List & Unordered List
Type Attribute
It specifies the type of numbering used to mark items in the list.
Syntax:

For unordered list:-


<ul type = “value”>
Where , value = disc/square/circle

For Ordered list:


<ol type = “value”>
Where ,value = A|a|i|I|1
List Properties
1.List style type – This property specifies the bullet style that will be
used as the type of list item marker.
Syntax : list–style-type:value

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

Syntax : List-style-position :value


Value = inside|outside

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:-

You might also like