HTML and CSS Reference
In the Lab
Lab 2: Creating a Healthy Living Web Page
Problem: You work for the Healthy Living Commission in your city. You would like to create a Web
page showing two great ideas for healthy living, as shown in Figure 2-48.
all text on Web
page is centered
Instructions: Perform the following steps:
1. Create a new HTML file in Notepad++ with the title, Lab 2-2, within the <title> </title> tags. For
the initial HTML tags, you can use the structure.html file if you created one at the start of this
chapter's project, otherwise type the initial tags.
2. Begin the body section by adding an <h1> heading, Healthy Living Plan. Format the heading to
use the heading 1 style center-aligned on the Web page. ( Hint: See the text-align property in
Appendix D to center the heading.)
3. Add the centered paragraph of text shown in Figure 2- 47. Make sure the fourth sentence displays
on the next line with no blank line in between. ( Hint: Use the <br /> tag.)
4. Add a horizontal rule with a height of 10 pixels, a width of 80%, and a background color of
5. Add a centered heading, as shown, using the heading 2 style.
6. Add the healthy.png image. Find the height and width properties for that image and include them
together with alternate text.