O'Reilly logo

HTML & XHTML: The Definitive Guide, 6th Edition by Bill Kennedy, Chuck Musciano

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

Hyperlinks

While text may be the meat and bones of an HTML or XHTML document, the heart is hypertext. Hypertext gives users the ability to retrieve and display a different document in their own or someone else’s collection simply by a click of the keyboard or mouse on an associated word or phrase (hyperlink) in the document. Use these interactive hyperlinks to help readers easily navigate and find information in your own or others’ collections of otherwise separate documents in a variety of formats, including multimedia, HTML, XHTML, other XML, and plain text. Hyperlinks literally bring the wealth of knowledge on the whole Internet to the tip of the mouse pointer.

To include a hyperlink to some other document in your own collection or on a server in Timbuktu, all you need to know is the document’s unique address and how to drop an anchor into your document.

URLs

While it is hard to believe, given the billions of them out there, every document and resource on the Internet has a unique address, known as its uniform resource locator (URL; commonly pronounced “you-are-ell”). A URL consists of the document’s name preceded by the hierarchy of directory names in which the file is stored (pathname), the Internet domain name of the server that hosts the file, and the software and manner by which the browser and the document’s host server communicate to exchange the document (protocol):

protocol://server_domain_name/pathname

Here are some sample URLs:

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