Building relationships with LINK

Wouldn't it be nice if you could build links to key, standard parts of your web site right into the browser chrome? Well, using the HTML link element (and the right browser), you can do just that. link allows you to define semantic relationships between documents and files, and it is used most commonly to specify the style sheet for a page. See Alternative Style: Working With Alternate Style Sheets at A List Apart for more about this. You can also use link to indicate other web pages that bear some relationship to the current page. That's what we'll look at here.

link elements are placed in the document head, and look like this:

<link rel="Contents" href="/sitemap." title="Site Map">

It must be noted that most browsers will happily ignore your links, although a few support them. Despite the poor browser support, the only negative impacts to implementing them are a few hundred bytes added page weight and a few minutes of your time.

W3C defines the following list of link types (for our purposes we'll skip "Alternate" and "Stylesheet"):

  • Appendix
  • Bookmark
  • Chapter
  • Contents
  • Copyright / ToC
  • Glossary
  • Help
  • Index
  • Next
  • Prev / Previous
  • Section
  • Start
  • Subsection

You can see that they are basically useful for navigating a large multi-page document like a university thesis or, hmm, the specs. You might be surprised that terms like "Home page" and "Site map" are nowhere to be seen.

Here's what I've found works in Opera:

  • Author
  • Contents / ToC
  • Copyright
  • First
  • Glossary
  • Help
  • Home
  • Index
  • Last
  • Next
  • Previous / Prev
  • Search
  • Up

And here's what seems to work in Mozilla:

  • Appendix *
  • Author
  • Bookmark *
  • Chapter *
  • Contents / ToC
  • Copyright
  • First
  • Glossary
  • Help
  • Index
  • Last
  • Next
  • Previous / Prev
  • Search
  • Section *
  • Subsection *
  • Top (the equivalent of Opera's Home)
  • Up

* You can reuse these types as often as you like.

10 June 2004

World Wide Web Consortium (W3C)
"An international consortium where Member organizations, a full-time staff, and the public work together to develop Web standards."
HyperText Markup Language
The coding language used to create hypertext documents for use on the World Wide Web.