Question:

Write the complete HTML code to design a webpage with the following specifications:

(I) The title of the webpage should be "Healthy Living".
(II) Background color of the page should be "LightGreen".
(III) The main heading "Benefits of Yoga" should be in color "Blue".
(IV) The paragraph describing yoga (as shown above) with font size "5".
(V) An unordered list listing three benefits: "Flexibility", "Strength", "Peace".

Show Hint

Build the page in order: title in head, bgcolor on body, h1 with blue colour, font tag with size 5, then ul with three li.
Updated On: Nov 3, 2026
Show Solution
collegedunia
Verified By Collegedunia

Solution and Explanation

Step 1: Plan the page skeleton:
Every page is wrapped in <html>. The title goes in <head>, and everything that shows on the page goes in <body>. We then add each specification inside this skeleton, one at a time.

Step 2: Specification I: the title:
The page title shows on the browser tab. It is written with the <title> tag inside <head>.
<head>
<title>Healthy Living</title>
</head>


Step 3: Specification II: the background colour:
The page background is set with the bgcolor attribute of <body>.
<body>


Step 4: Specification III: the blue heading:
The main heading uses <h1>. The picture shows it in the middle, so we place it inside <center>. The blue colour is given with inline CSS in the style attribute.
<center><h1 style="color:blue;">Benefits of Yoga</h1></center>


Step 5: Specification IV: the paragraph with font size 5:
The sentence is a paragraph, so it goes in <p>. The size 5 is set with <font size="5"> around the text.
<p><font size="5">Yoga is a practice that connects the body, breath, and mind.</font></p>


Step 6: Specification V: the unordered list:
A bulleted list is made with <ul>, and each benefit is one <li>.
<ul>
<li>Flexibility</li>
<li>Strength</li>
<li>Peace</li>
</ul>


Step 7: Join everything into one page:
Placing all pieces inside the skeleton gives the complete code.
<html>
<head>
<title>Healthy Living</title>
</head>
<body>
<center><h1 style="color:blue;">Benefits of Yoga</h1></center>
<p><font size="5">Yoga is a practice that connects the body, breath, and mind.</font></p>
<ul>
<li>Flexibility</li>
<li>Strength</li>
<li>Peace</li>
</ul>
</body>
</html>


Final Answer:
The page above satisfies all five specifications. \[ \boxed{\text{Complete page: title, LightGreen body, blue h1, font size 5 paragraph, ul with 3 items}} \]
Was this answer helpful?
0
0

Top CBSE X Questions

View More Questions