Sie sind auf Seite 1von 4

<!

DOCTYPE html>

<html lang="en">

<head>

<!--

New Perspectives on HTML5 and CSS3, 7th Edition

Tutorial 10

Case Problem 4

1. Use your editor to open the


VoterWeb Election Results vw_election_txt.html and
vw_results_txt.js files from the
Author: Pam Carls html10 c case4 folder. Enter your
name and the date in the comment
Date: 2018-03-01 section of each file, and save them as
vw_election.html and vw_results.js
respectively

Filename: vw_election.html

-->

<title>VoterWeb Election Results</title>

<meta charset="utf-8" />


2. Go to the vw_election.html file in
<link href="vw_reset.css" rel="stylesheet" /> your editor. Directly above the closing
</head> tag, insert script elements to
<link href="vw_styles.css" rel="stylesheet" /> link the page to the vw_congminn.js
and vw_results.js files in that order.
Defer the loading and running of both
script files until after the page has
<script src="vw_congminn.js" defer></script> loaded

<script src="vw_results.js" defer></script>

</head>

<body>

<header>

<img src="vw_logo.png" alt="Appalachian House" id="logoImg" />


<nav class="horizontal">

<ul>

<li><a href="#">U.S. Congress</a></li>

<li><a href="#">U.S. Senate</a></li>

<li><a href="#">State Governors</a></li>

<li><a href="#">Presidential</a></li>

<li><a href="#">Timeline</a></li>

<li><a href="#">Search</a></li>

</ul>

</nav>

</header>

<nav class="vertical">

<ul>

<li><a href="#">Alabama</a></li>

<li><a href="#">Alaska</a></li>

<li><a href="#">Arizona</a></li>

<li><a href="#">Arkansas</a></li>

<li><a href="#">California</a></li>

<li><a href="#">Colorado</a></li>

<li><a href="#">Connecticut</a></li>

<li><a href="#">Delaware</a></li>

<li><a href="#">Florida</a></li>

<li><a href="#">Georgia</a></li>

<li><a href="#">Hawaii</a></li>

<li><a href="#">Idaho</a></li>

<li><a href="#">Illinois</a></li>

<li><a href="#">Indiana</a></li>

<li><a href="#">Iowa</a></li>
<li><a href="#">Kansas</a></li>

<li><a href="#">Kentucky</a></li>

<li><a href="#">Louisiana</a></li>

<li><a href="#">Maine</a></li>

<li><a href="#">Maryland</a></li>

<li><a href="#">Massachusetts</a></li>

<li><a href="#">Michigan</a></li>

<li><a href="#">Minnesota</a></li>

<li><a href="#">Mississippi</a></li>

<li><a href="#">Missouri</a></li>

<li><a href="#">Montana</a></li>

<li><a href="#">Nebraska</a></li>

<li><a href="#">Nevada</a></li>

<li><a href="#">New Hampshire</a></li>

<li><a href="#">New Jersey</a></li>

<li><a href="#">New Mexico</a></li>

<li><a href="#">New York</a></li>

<li><a href="#">North Carolina</a></li>

<li><a href="#">North Dakota</a></li>

<li><a href="#">Ohio</a></li>

<li><a href="#">Oklahoma</a></li>

<li><a href="#">Oregon</a></li>

<li><a href="#">Pennsylvania</a></li>

<li><a href="#">Rhode Island</a></li>

<li><a href="#">South Carolina</a></li>

<li><a href="#">South Dakota</a></li>

<li><a href="#">Tennessee</a></li>

<li><a href="#">Texas</a></li>

<li><a href="#">Utah</a></li>
<li><a href="#">Vermont</a></li>

<li><a href="#">Virginia</a></li>

<li><a href="#">Washington</a></li>

<li><a href="#">West Virginia</a></li>

<li><a href="#">Wisconsin</a></li>

<li><a href="#">Wyoming</a></li>

</ul>

</nav>
3. Scroll down the file and, directly 4. Open the vw_congminn.js file in
above the footer, insert an empty your editor and study the contents.
section element. You will write the Note that the file contains the results
HTML code of the election report in of 8 congressional elections in
<section></section>
this element. Save your changes to Minnesota. The candidate
the file information is stored in
multidimensional arrays named
candidate, party, and votes. Do not
<footer> make any changes to this file
<p>VoterWeb &copy; 2018 All Rights Reserved</p>

</footer>

</body>

</html>