Adscend

Click Here



Click Here



Click Here

Sunday 8 September 2013

Ordered List

HTML Ordered List

An ordered list starts with the <ol> tag.
Each list item starts with the <li> tag.
The list items are marked with numbers.

Example: 1

<html>
<head>

</head>
<body>

<ol >
<li>Home </li>
<li>PHP </li>
<li>HTML </li>
</ol>


</body>
</html>

Output

  1. Home
  2. PHP
  3. HTML

There are five types of numbers in ordered list:
a)Numeric
b)Lower Alpha
c)Upper Alpha
d)Lower Roman
e)Upper Roman

Type

Numbering Style

1

Numeric

1, 2, 3,

a

Alphabetic Lower

a, b, c,

A

Alphabetic Upper

A, B, C,

i

Roman Lower

i, ii, iii,

I

Roman Upper

I, II, III,


a)Numeric

Example: 2

<html>
<head>

</head>
<body>

<ol type="1">
<li>Home </li>
<li>PHP </li>
<li>HTML </li>
</ol>


</body>
</html>

Output

  1. Home
  2. PHP
  3. HTML

b)Lower Alpha

Example: 3

<html>
<head>

</head>
<body>

<ol type="a">
<li>Home </li>
<li>PHP </li>
<li>HTML </li>
</ol>


</body>
</html>

Output

  1. Home
  2. PHP
  3. HTML

c)Upper Alpha

Example: 4

<html>
<head>

</head>
<body>

<ol type="A">
<li>Home </li>
<li>PHP </li>
<li>HTML </li>
</ol>


</body>
</html>

Output

  1. Home
  2. PHP
  3. HTML

d)Lower Roman

Example: 5

<html>
<head>

</head>
<body>

<ol type="i">
<li>Home </li>
<li>PHP </li>
<li>HTML </li>
</ol>


</body>
</html>

Output

  1. Home
  2. PHP
  3. HTML

e)Upper Roman

Example: 6

<html>
<head>

</head>
<body>

<ol type="I">
<li>Home </li>
<li>PHP </li>
<li>HTML </li>
</ol>


</body>
</html>

Output

  1. Home
  2. PHP
  3. HTML

Special case
It is needed to change the starting number.For example,in situation where list number is separated by image or text.

Example: 7

<html>
<head>

</head>
<body>

<ol type="i">
<li>Home </li>
<li>PHP </li>
<li>HTML </li>
</ol>


<p>Number start with four </p>

<ol type="i" START="4">
<li>perl</li>
</ol>

</body>
</html>

Output

  1. Home
  2. PHP
  3. HTML

Number start with four

  1. perl




No comments:

Post a Comment