link
element.Today is the third post about the importance of "real" structural HTML elements. I'm trying to give you some information about the link
element. This element is really flexible and you can actually extend it yourself. The W3C provides a list of valid link types. But at the bottom of the list they say:
Authors may wish to define additional link types not described in this specification.
This intro may be to quick for you, maybe you don't understand what this element is for. I will explain that now. The link element is all about relations between documents. If you have alternate language versions of you document you could use rel="alternate"
together with lang
or xml:lang
if you're using XML (XHTML) based documents.
This website is using quite some different link types:
stylesheet
alternate stylesheet
(for the upcoming Matrix stylesheets and one for a print preview)
start
(this way google knows where to start indexing)
search
(a quick link to this sites search box)
validate
(I "invented" this for easy validating my documents)
top
(root directory of this weblog)
section
(for the different sections in which this site is divided)
chapter
(all the categories are listed under this one)
bookmark
(bookmark a specific div on this page; I took this one from the W3C homepage)
alternate
(for my RSS feeds)
EditURI
(for the RDF document)
generator
(most of the time this one is used as the value of the name
attribute from the meta
element, since I wanted to have an href
attribute on this as well, I transferred it over to the link
element.
And that's the complete list. In the future I'm planning to use prev
and next
, since those are excellent for a fast browsing experience. Unfortunately most people today are still browsing Internet Explorer, which hasn't any support for this so far. Fortunately Mozilla and Opera have! Mozilla has more support until now, but maybe Opera 7.2 will change things. This element is also great for people who are using lynx. Read more.
Although your public/audience may all use IE, still use this element! Google uses it and more Internet Based Applications will do. Bookmarklets can be written to auto detect these and bookmark the URI which points to an RSS file hidden in this element. And so on. So start using this wonderful element today.