Exercise 1: Add a page layout to the calculator project
In this exercise, you apply your knowledge of semantic markup by adding a page layout to
the WebCalculator project that you worked on in Chapter 4, “Getting started with CSS3,” and
then you add style rules to improve the look of the webpage.
This exercise continues with the goal of adding style rules with a minimum of modifica-
tions to the default.html file.
Start Visual Studio Express 2012 for Web. Click File, choose Open Project, and then
select the solution you created in Chapter 4.
Select the WebCalculator.sln file and click Open. You can also click File, choose Recent
Projects And Solutions, and then select the solution.
If you didn’t complete the exercises in Chapter 4, you can use the solution in the
Chapter 5 Exercise 1 Start folder.
In the Solution Explorer window, right-click the default.html file and choose Set As
Start Page. Press F5 to verify that your home page is displayed.
Open the default.html page and wrap the
element whose id is calculator with a
element, and then set the id to container.
This
element will contain the complete page layout.
In the container
element, insert a element containing an
element with an id of headerText. In the element, insert an
element
containing the text, “Contoso, Ltd.” After the
element, insert an
element
containing the text, “Your success equals our success.”
The header should look like the following.
Contoso Ltd.
Your success equals our success
After the element, insert a
Insert a dummy link to the home page, which is the current page.
This will display on the page to give you an idea of what the element is used
for. The element should look like the following. Home
After the element, wrap the calculator
element with a
element
whose role is set to main.
Contoso Ltd. - Training Guide: Programming in HTML5 with JavaScript and CSS3 Ebook - free download pdf - issuhub">