246
Chapter 4.5
Checking out top5.html
Open up top5.html and take a look. Most of the le is lled
with <img> elements to display the CD covers. You’ll also see some
instructions, a form with a button, and a few <div>s:
<html>
<head>
<title>Top 5 CD Recommendations</title>
<link rel=”stylesheet” type=”text/css” href=”top5.css” />
</head>
<body>
<div id=”instructions”>
Click on a CD cover to add it to the Top 5 list. If you want to start
over, click the “Start Over” button to clear the Top 5 list.
</div>
<div id=”cds”>
<img class=”cover” src=”images/vaughan_ood.jpg” />
<img class=”cover” src=”images/clapton_cream.jpg” />
<!-- Lots more images in here... -->
</div>
<div id=”top5-listings”>
<h2>My Top 5 CDs</h2>
<div id=”top5”></div>
</div>
<form>
<input type=”button” value=”Start Over” />
</form>
</body>
</html>
All these id
attributes will
help when we
need to look
these elements
up in our code.
Nothing tricky here...
just lots of <img>
elements to show the CD
covers to choose from.
Here’s where we’ll put the
CDs that the user chooses.
As usual, this app uses an
external CSS stylesheet.
We’ll probably need to run some
JavaScript here at some point...
the top5 cds html