lists in HTML are used to specify the information as a list. list tags are important tags in HTML because by the list we can understand easily what the content says in this article we know HTML list tags and types of lists in HTML with examples,
Types of lists in HTML
In HTML there are three types of lists. let’s see all three lists one by one.
HTML Ordered list ( <ol> )
An ordered list means a list of items arranged in a sequential order. an ordered lists typically start with a numeric value(1,2,3,4…) or an alphabet (a,b,c,d…) or Roman values(I, II, III, IV, V…)
The syntax for creating HTML for an ordered list
<!doctype html>
<html>
<head>orderd list</head>
<body>
<ol>
<li>Apple</li>
<li>banana</li>
<li>orange</li>
<ol>
<body>
<html>
HTML Unordered list (<ul>)
An unordered list is a list of items it does not arrange in sequential order, an unordered list is marked with a bullet(•) and a square(■) symbol, let us see the example of an unordered list.
<!doctype html>
<html>
<head>orderd list</head>
<body>
<ul>
<li>Apple</li>
<li>banana</li>
<li>orange</li>
<ul>
<body>
<html>
HTML Definition list (<dl>)
A definition list in HTML is defined as a list of items and their corresponding description of the item. for example, if we have a list team like HTML (definition term<dt>) and HTML description list which is, HTML is a hypertext markup language that is used to give a structure of a webpage (definition description<dd>).
The code for the definition of a list in HTML lets us understand it with the help of the code for the definition list in HTML.
Definition List Example
<!doctype html>
<html>
<head>orderd list</head>
<body>
<dl>
<dt>HTML</<dt>
<dd>HTML stand for hyper text markup language </dd>
<dt>CSS</dt>
<dd>CSS stand for cascading style sheet</dd>
</dl>
<body>
<html>
Understanding the example
- <dl>: it is like a container for the list.
- <dt>: definition term defines what you want to explain.
- <dd>: description of the term.
FAQ
1. Types of lists in HTML.
Ans:- There are three types of lists in HTML, ordered, unordered, and definition list.
2. What is the definition list in HTML?
Ans:- A definition list in HTML is defined as a list of items and their corresponding description of the item.
3. What do you mean by lists?
Ans:- lists in HTML are used to specify the information in the form of a list.
4. What is the list tag?
Ans:- list <li> is used in HTML to represent the items of list.
5. What is HTML in English?
Ans:- Hyper Text Markup language.
Know More information
Pingback: Top 5 technical degree to Pursue your career
Pingback: Semantic and non-semantic element in HTML.
Pingback: Introduction to Python -