Question:medium

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

Solution and Explanation

Step 1: Read the picture and list what must appear:
From the picture we see a light green page, a blue centred heading, one large sentence and a bulleted list of three words. The tab text must be Healthy Living. We now turn each item into a tag.

Step 2: Write the empty frame first:
We start with a frame that has a head and a body and nothing else.
<html>
<head>
</head>
<body>
</body>
</html>


Step 3: Fill the head and set the body colour with CSS:
The title goes into the head. For the colour we use the style attribute on <body> with background-color:LightGreen;. This gives the same result as the bgcolor attribute.

Step 4: Fill the body in the order shown in the picture:
First the heading. The tag <h1> with align="center" puts it in the middle, and color:blue; in its style makes it blue. Next the paragraph with <font size="5">. Last the list with <ul> and three <li> items.

Step 5: Write the finished code:
<html>
<head>
<title>Healthy Living</title>
</head>
<body style="background-color:LightGreen;">
<h1 style="color:blue;">Benefits of Yoga</h1>
<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>


Step 6: Tick every specification:
I: title is Healthy Living. II: the body background is LightGreen. III: the heading is blue and central. IV: the paragraph has font size 5. V: the list has Flexibility, Strength and Peace. All five are done. The answer using bgcolor and <center> is equally correct.

Final Answer:
The complete page meets all five specifications. \[ \boxed{\text{Complete page with all five specifications met}} \]
Was this answer helpful?
0