HTML Ordered List
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
- Home
- PHP
- 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
- Home
- PHP
- 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
- Home
- PHP
- 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
- Home
- PHP
- 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
- Home
- PHP
- 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
- Home
- PHP
- HTML
Special case
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
- Home
- PHP
- HTML
Number start with four
- perl
 
No comments:
Post a Comment