Lists in HTML
Lists in HTML
Lists are an important part of a document. Whether it is a word document or pdf document or web document. It adds functionality to understand the contents clearly. In your textbook you have seen the list of questions, points are listed in numbers or symbols!
This information makes your text and document contents more attractive and readable.
Types of Lists in HTML
HTML support three types of lists basically. They are:
- Ordered (Numbered) Lists – A list with numbers.
- Unordered (Bulleted) Lists – A list with symbols or bullets
- Description (Definition) Lists – A list to write definitions or terminologies
Ordered (Numbered) Lists
To generate order lists in HTML following tags are used:
- OL: The ordered lists always starts with <ol> and ends with </ol>.
- LI: LI tag specifies list items and written between <ol> and </ol>. For a number of the list items, the same number of <li> tags are required.
UNORDERED LISTS
<html>
<head>
<title>unordered list Demo2</title>
</head>
<body>
<h1>Unordered Disc</h1>
<ul>
<li>Lion</li>
<li>Tiger</li>
<li>Giraffe</li>
<li>Camel</li>
</ul>
<h1>Top Rhymes </h1>
<ul type="square">
<li>Johny Johny Yes papa</li>
<li>Wheels on the Bus</li>
<li> Baa Baa Black Sheep</li>
</ul>
<h1>Fruits Name List</h1>
<ul type="circle" >
<li > Avacado</li>
<li> Orange</li>
<li>Pears</li>
<li> Banana</li>
</ul>
</body>
</html>
HTML List Tags
Tag | Description |
---|---|
<ul> | Defines an unordered list |
<ol> | Defines an ordered list |
<li> | Defines a list item |
<dl> | Defines a description list |
<dt> | Defines a term in a description list |
<dd> | Describes the term in a description list |
Comments
Post a Comment