Questions
Write down the names of any four states of India using all types of list i.e. ordered list, unordered list and definition list. The page should have background colour. The text colour of each type of the list should be different.
Last Updated : 16 Jul 2025
Jan 24, Jul 24
Solution:
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body style="background-color: #e6f7ff;">
<h1>List of Indian States</h1>
<h2>Un ordered List</h2>
<ul style="color: blue;">
<li>Maharashtra</li>
<li>Tamil Nadu</li>
<li>Uttar Pradesh</li>
<li> Rajasthan</li>
</ul>
<h2>Ordered List</h2>
<ol style="color:orange;">
<li>Goa</li>
<li>Punjab</li>
<li>Madhya Pradesh</li>
<li> Kerala</li>
</ol>
<dl style="color:red;">
<dt>Gujrat</dt>
<dd>Buisness</dd>
<dt>Haryana</dt>
<dd>Agricu....</dd>
<dt>Andhra Pradesh</dt>
<dd>Rich Temples and History</dd>
<dt>Bihar</dt>
<dd>Nitish Kumar CM</dd>
</dl>
</body>
</html>
OUTPUT:
Code Explanation:
- Background Color: The page background is light blue (
#e6f7ff
). <h1>
: Main heading "List of Indian States".- Unordered List (
<ul>
):- Lists states with blue text.
- Items: Maharashtra, Tamil Nadu, Uttar Pradesh, Rajasthan.
- Ordered List (
<ol>
):- Lists states with orange text in a numbered format.
- Items: Goa, Punjab, Madhya Pradesh, Kerala.
- Description List (
<dl>
):- Lists states with descriptions in red text.
- Each
<dt>
represents a term (state), and each<dd>
provides a description.
Meanwhile you can watch this video
Watch Video