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 web-like. 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 diagramed, 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.

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

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

For example, suppose the On Target Games Web site reviews video games and the site posts an extremely positive review of a game by Acme Games. Acme Games could put a link to the review on its site, helping to promote the game. Such an arrangement would resemble the diagram shown in Figure ...

Get HTML, XHTML, and CSS Bible, Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.