O'Reilly logo

HTML, XHTML, & CSS All-in-One For Dummies®, 2nd Edition by Andy Harris

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 5. Making Connections with Links

In This Chapter

  • Understanding hyperlinks

  • Building the anchor tag

  • Recognizing absolute and relative links

  • Building internal links

  • Creating lists of links

The basic concept of the hyperlink is common today, but it was a major breakthrough back in the day. The idea is still pretty phenomenal, if you think about it: When you click a certain piece of text (or a designated image, for that matter), your browser is instantly transported somewhere else. The new destination might be on the same computer as the initial page, or it could be literally anywhere in the world.

Any page is theoretically a threshold to any other page, and all information has the ability to be linked. This is still a profound idea. In this chapter, you discover how to add links to your pages.

Making Your Text Hyper

The hyperlink is truly a wonderful thing. Believe it or not, there was a time when you had to manually type in the address of the Web page you wanted to go to. Not so anymore. Figure 5-1 illustrates a page that describes some of my favorite Web sites.

In Figure 5-1, the underlined words are hyperlinks. Clicking a hyperlink takes you to the indicated Web site. Although this is undoubtedly familiar to you as a Web user, a few details are necessary to make this mechanism work:

  • Something must be linkable. Some text or other element must provide a trigger for the linking behavior.

  • Things that are links should look like links. This is actually easy to do when you write plain XHTML ...

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