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


 

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

In this section, you will see the use 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.

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.

Ads