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.

linking to a destination anchor<br />

Now that you’ve got your hands on their <strong>HTML</strong>...<br />

Scroll down until you see the Coffee section; it looks like this:<br />

This is similar to the naming problem<br />

<strong>with</strong> mateine and guaranine.<br />

<br />

Coffee<br />

<br />

All fluid ounces are U.S. fluid ounces.<br />

<br />

Reworking the link in “index.html”<br />

Now all you need to do is revisit the link to Caffeine Buzz<br />

and add on the destination anchor name, like this:<br />

154 Chapter 4<br />

This is a snippet from the<br />

Starbuzz “index.html” file.<br />

Just a small snippet from<br />

the Caffeine Buzz page.<br />

Here’s the Coffee section. You can<br />

see the heading for it along <strong>with</strong><br />

the start of the paragraph below.<br />

Ahhh, and here is the<br />

destination anchor. It has<br />

the name “Coffee”.<br />

Add # along <strong>with</strong> the<br />

destination anchor id to<br />

your href.<br />

Read the Caffeine Buzz<br />

Exercise<br />

Make this change to your Starbuzz<br />

“index.html” file. Reload and click on<br />

the “Caffeine Buzz” link. You should be<br />

taken directly to the Coffee section of<br />

Caffeine Buzz’s front page.

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

Saved successfully!

Ooh no, something went wrong!