HTML <li> Tag
In this tutorial, we will learn about li tag in HTML with the help of examples.
<li> Tag
Li tag <li> is used to define a list item inside ordrered lists<ol>, unordered lists(<ul>), and in menu lists(<menu>).
Syntax
<li>........</li>
Example
<!DOCTYPE html>
<html>
<head>
<title>Li Tag</title>
</head>
<body>
<ul>
<li>HTML</li>
<li>CSS</li>
<li>Javascript</li>
</ul>
</body>
</html>
Output
- HTML
- CSS
- Javascript
Specific Attribute
Attribute | Value | Description |
---|---|---|
type | a A I i 1 disc square circle |
It specifies the type of the list |
value | number | It specifies the value of a list item |
Global Attribute
Li Tag support all the global attributes of HTML.
Event Attribute
Li Tag support all the event attributes of HTML.
Next Tutorial
We hope that this tutorial helped you develop better understanding of the concept of <li> tag in HTML.
Keep Learning : )
In the next tutorial, you'll learn about HTML <link>
Tag.