Share on Google+Share on Google+

HTML5 li tag, Introduction of <li> tag in HtML5.

In this section, you will see the use of <li> tag in HTML5.

HTML5 li tag, Introduction of <li> tag in HtML5.


The <li> tag is used to define the item of list. In supports both order and unordered list item. The <ol> tag is used for order list and the <ul> tag is used for unordered list. It mostly used between ordered list tag or unordered list tag. The value attribute can support  only for ordered list .

Attributes of form:
Attribute Value Description
value number, character etc li specify the value of list first item.

Declaration Syntax :
Declaration syntax of <li> in HTML5.
<li value="initial value"> List item</li>

Example of <li> in HTML5:

<!DOCTYPE html>
<html >
<title>List of items </title>
<h2>Example of &lt;li&gt; list item tag of HTML5.</h2>
<strong>Unordered list</strong><ul>
<strong>Ordered list:</strong><ol>
<li>Bharat Singh</li>
<li>Ankit kumar</li>
<li>Vinay </li>
<strong>Ordered list with specified value:</strong>
<ol >
<li value="10">Bharat Singh</li>
<li>Ankit kumar</li>
<li>Vinay </li>

Download this code

Difference Between HTML5 and HTML4.01:

No difference.



Posted on: September 9, 2010 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Share this Tutorial 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.