HTML List
- HTML Lists are used to specify the lists of data.
- List can helps for one or more list components can present in every list. Each of the list items starts with <li>...</li> tags.
- Three different categories of HTML lists exist:
=> Ordered List
=> Unordered List
=> Description List
HTML Ordered List:
- HTML ordered list are also called as numbered list using <ol>...</ol> tags.
- Order list can used arrange order of list can specifies.
Example:
<!DOCTYPE
html>
<html>
<head>
<title>list</title>
</head>
<body>
<h2>HTML Ordered
list</h2>
<ol>
<li>Python</li>
<li>Java</li>
<li>C++</li>
</ol>
</body>
</html>
Output:
HTML Unordered List:
- HTML unordered list are also called as bulleted list using <ul>...</ul> tags.
- Each list items can starts with <li> tag. It can present with list of bullet points.
Example:
<!DOCTYPE
html>
<html>
<head>
<title>List</title>
</head>
<body>
<h2>HTML Unordered list</h2>
<ul>
<li>Python</li>
<li>Java</li>
<li>C++</li>
</ul>
</body>
</html>
<html>
<head>
<title>List</title>
</head>
<body>
<h2>HTML Unordered list</h2>
<ul>
<li>Python</li>
<li>Java</li>
<li>C++</li>
</ul>
</body>
</html>
Output:
HTML Description List:
- HTML description lists also called definition list.
- An item list used to describe each keyword in words on the list page is known as a description list.
Example:
<!DOCTYPE
html>
<html>
<title>List</title>
<head>
</head>
<body>
<h2> HTML Description List</h2>
<dl>
<dt>HTML</dt>
<dd>- Hyper Text Markup Language</dd>
<dt>CSS</dt>
<dd>- Cascading Style Sheet</dd>
</dl>
</body>
</html>
<html>
<title>List</title>
<head>
</head>
<body>
<h2> HTML Description List</h2>
<dl>
<dt>HTML</dt>
<dd>- Hyper Text Markup Language</dd>
<dt>CSS</dt>
<dd>- Cascading Style Sheet</dd>
</dl>
</body>
</html>
Output:
More topic in HTML