Home Tutorial Html Html5 HTML5 <ol> tag, Example of <ol> tag in html 5

 
 

Share on Google+Share on Google+
HTML5 <ol> tag, Example of <ol> tag in html 5
Posted on: September 10, 2010 at 12:00 AM
Advertisement
In this tutorial, We will discuss about <ol> tag in html5.

HTML5 <ol> tag, Example of <ol> tag in html 5

In this tutorial, We will discuss about <ol> tag in html5. The <ol> tag is used for defining a ordered list. The ordered list is represented as listing by number serially. We can change the number from that serial is starts in the ordered list by using "start" attribute. In The ordered list the list is created by <li> tag and <ol> tag must have opening and closing tag. 

Declaration Syntax:

The syntax for the <ol> tag is as:

<ol>List Of  Items Here </ol>

This tag have two specific attributes are as:

start="value"    This attribute value specify the list value of the first list item. The number must be a ordinal value.

reversed="value"  This attribute indicates that the list item is in descending if present and in ascending if not present.

Example: orderlist_tag.html.

<!DOCTYPE html>
<html>
  <head>
      <title>Example of orderlist Tag</title>
  </head>
  <body>
  <ol start="5" >
          <li>Gyan</li>
          <li>Ankit</li>
          <li>Bikrant</li>
  </ol>
  </body> 
</html>

Output:

Download This Example:

Difference Between html5 and html4.01.

The reversed attribute is the new introduction in html5. start attribute is not supported by html4.01 but html5 support it.

Advertisement

Related Tags for HTML5 <ol> tag, Example of <ol> tag in html 5:


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: September 10, 2010

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com