O'Reilly logo

HTML, XHTML, and CSS Bible, Fifth Edition by Steven M. Schafer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 8. Links

IN THIS CHAPTER

  • What's in a Link?

  • Linking to a Web Page

  • Absolute versus Relative Links

  • Link Targets

  • Link Titles

  • Keyboard Shortcuts and Tab Order

  • Creating an Anchor

  • Choosing Link Colors

  • Link Destination Details

  • The Link Tag

Links are what make the World Wide Web weblike. One document on the Web can link to several other documents, and those in turn link to other documents, and so forth. The resulting structure, if diagrammed, resembles a web. The comparison has spawned many "web" terms commonly used on the Internet; for example, electronic robots that scour the Web are known as spiders.

Besides linking to other documents, you can link to just about any content that can be delivered over the Internet — media files, e-mail addresses, FTP sites, and so on.

This chapter covers the ins and outs of linking to references inside and outside the current document and how to provide more information about your documents' relationships to others on the Web.

What's in a Link?

Web links have two basic components: the link and the target, or destination.

  • The link is the tag in the main document (source) that refers to another document.

  • The target, or destination, is the document (or particular location in the document) to which the link leads.

For example, suppose the Acme Games website reviews video games, and the site posts an extremely positive review of a game by On Target Games. Acme could put a link in the review on its site, leading to the game's product page on On Target's site. Such an ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required