As an HTML snob, I've always had a certain fondness for the dulled edge of HTML. I like to find those interesting elements and attributes in HTML that should be useful (but aren't because Microsoft and Netscape won't support them), and use them anyway. Since 1995, all sorts of theoretically useful things like doctype and acronym were appearing in my web pages when no one else thought they were useful. In fact, it's a big part of how I got my reputation as a websnob.
Now it's the year 2002, and several of those elements are considered useful by the major browsers. I've decided to taunt the bulls again by explaining how to use another one of my favorite underachievers, the LINK element. LINK is simple bit of HTML that any be added to any web page, but it adds a class of information that usually overlooked in marking up text for the Web.
Although it's otherwise out of date, the HTML 3.2 specifications provide a good, succint defintion of what LINK does.
The LINK element indicates a relationship between the document and some other object.
That short sentence explains what's special about LINK. Where most elements describe the structure or function of content on a web page, LINK describes the function of pages and the structure of the web. LINK provides for a poor man's semantic web, allowing LINK-aware web browsers to analyze the organization of a web site, and assist the user in navigating it better. By using LINK you make it easier for users to find key documents like your home page, help section, or search engine.
LINK-aware browsers may implement LINK in different ways. Some turn LINKs into special links on the web page (see screenshot of Lynx 2.8.3), while some add extra buttons on the browser toolbar (see a screenshot of Mozilla RC1), and others bind the LINKs to hotkeys. The important thing is that each browser provides the user with a consistent interface for finding key documents on a web site.
LINK may not seem useful (especially if your browser doesn't do much with it), but adding some basic LINK relationships to your pages three benefits:
First, you'll be mapping the structure of your website. In addition to helping users understand the organization of your site, forcing yourself to think about structure might help you build more functional sites.
Second, you'll be providing extra functionality for users with advanced browsers. While only a few browser do anything significant (or visible) with LINK elements in 2002, the people using those browsers are often the ones with high standards. Users appreciate sites that try to meet high standards.
Third, you're building future functionality into your site now. The LINK element is an "empty tag" element, meaning it will be completely (and safely) ignored by browsers than don't use it. Start adding LINK elements now, and you're making yourself ready for more advanced browsers without alienating any of your current users. Don't you wish embed had worked that well?
Even if you've never used LINK before, you'll grasp the basics pretty quickly if you've done HTML by hand. If you can visualize LINK as a cross between meta and a, you'll grok it in less than a minute. The three key concepts of building a LINK are:
LINK, like meta, is an empty element located in the head of a web page. That means there is no closing tag, or content between tags. Everything you need to know in a LINK is encased within one tag, using attribute values.
LINK, like a requires an href attribute to identify the URI you're linking to. You can use any valid URI for the href, but http and mailto URLs are the most common.
LINK defines the relationship between two URIs, so it needs an attribute for identifying the relationship. That attribute is called rel. (There's also a rev attribute for identifying reveresed relationships. Every LINK must have a rel and/or rev attribute, but you shouldn't worry about rev right now. It only complicates things.)
That's all you need to know to create simple links. For example, a link to the start page (home page) of your site would look like this:
<link rel="Start" href="/index.html">
while a link to your site's help section might look like:
<link rel="Help" href="/help.html">
The value of rel or rev is one or more keywords that identify the relationship of the target document (what you're linking to) to the current document (the page you're linking from) or document collection (the site you're linking from). You can create your own keywords (not recommended for beginners) or use the keywords already in use on the Web. There have been several proposed schemes for relationship keywords. If you want to see them all, HTML Snob has a separate page about link relationships. If you want to keep is simple, here are some basic relationships you can start with:
The HTML 4.01 specification declares several other LINK attributes in addition to rel, rev, and href. Most of these can be safely ignored most of the time. HTML Snob's list of Link Relationships explains with relationships require additional attributes.
[an error occurred while processing this directive]