HTML Tutorial
<li>The <li> tag, short for "list item," is used to define individual items within a list. It is commonly used inside <ul> (unordered list) or <ol> (ordered list) elements.
<li>The <li> tag can have the following attributes:
<ol> only.<ul> only (e.g., "circle", "square").<li><ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>
<ol>
<li value="1">First Item</li>
<li value="2">Second Item</li>
<li value="3">Third Item</li>
</ol>
Exploring the <li> Tag: A Simple HTML Example
HTML Code:
<!DOCTYPE html>
<html>
<body>
<h1>My List</h1>
<ul>
<li>Coffee</li>
<li>Tea</li>
<li>Juice</li>
</ul>
</body>
</html>
This code will create an HTML document with a heading "My List" and an unordered list containing three items: "Coffee", "Tea", and "Juice".
<ul> tag defines the list.<li> tag represents an individual item in the list.<li> tags in this example.