Home Tutorial Html Html5 HTML5 li tag, Introduction of <li> tag in HtML5.

 
 

Share on Google+Share on Google+
HTML5 li tag, Introduction of <li> tag in HtML5.
Posted on: September 9, 2010 at 12:00 AM
Advertisement
In this section, you will see the use of <li> tag in HTML5.

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

Description:

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:

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

Download this code

Difference Between HTML5 and HTML4.01:

No difference.

Advertisement

Related Tags for HTML5 li tag, Introduction of <li> tag in HtML5.:


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 9, 2010

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com