04.06.2013 Views

Head First HTML with CSS

Head First HTML with CSS

Head First HTML with CSS

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

adding individual image pages<br />

Create individual pages for the photos<br />

<strong>First</strong>, create a new folder called “html” to hold these individual pages, just<br />

below the “mypod” folder:<br />

photos<br />

<br />

<br />

myPod: Seattle Ferry<br />

body { background-color: #eaf3da; } <br />

<br />

<br />

Seattle Ferry<br />

<br />

<br />

<br />

<br />

<br />

200 Chapter 5<br />

mypod<br />

thumbnails<br />

<br />

.<br />

.<br />

.<br />

<br />

index.html<br />

html<br />

Now we’re going to create one <strong>HTML</strong> file for each photo. If the photo is called<br />

“seattle_med.jpg”, then let’s call the <strong>HTML</strong> file “seattle_med.html” just to be<br />

consistent. In each <strong>HTML</strong> file, we’ll have a heading that describes the photo,<br />

followed by the photo. Here’s the <strong>HTML</strong> for the first Seattle photo. All the<br />

other pages will follow this same format:<br />

Notice that we need to use “..” in the relative path<br />

because the “html” folder is a sibling of the “photos”<br />

folder, so we have to go up one folder and then down<br />

into “photos” when using relative links.<br />

Title for the page. This<br />

should describe the photo.<br />

Here we give the page a descriptive heading.<br />

Here’s the element that points to the large<br />

“seattle_med.jpg” photo. Let’s also give the image<br />

a descriptive alt attribute.<br />

As you’ve probably<br />

guessed, we’ve already<br />

created this folder for<br />

you in the book examples.<br />

Here’s our ready bake <strong>CSS</strong><br />

again, just to keep the page<br />

a consistent color.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!