HTML
<!DOCTYPE html>
<html>
<head>
<title>HTML Lists</title>
</head>
<body>
<h2>Unordered List</h2>
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>
<h2>Ordered List </h2>
<ol>
<li>First item</li>
<li>Second item</li>
<li>Third item</li>
</ol>
<h2>Definition List</h2>
<dl>
<dt>Term 1</dt>
<dd>Definition 1</dd>
<dt>Term 2</dt>
<dd>Definition 2</dd>
</dl>
</body>
</html>
Code Output
HTML Lists
HTML lists are used to organize and present information in a structured manner.
Types of Lists
<ul>
: An unordered list represents a collection of items that are unordered. Each item is marked with a bullet point.<ol>
: An ordered list represents a collection of items that have a specific sequence. Each item is numbered by default.<dl>
: A definition list consists of a series of terms and their corresponding definitions.