Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

The <link> tag appears to have many uses aside from stylesheets. For example the W3 suggest using it for previous/next/index pages.

I know that Opera also has a Navigation toolbar that will show links when present, including Home, Index, Contents, Previous, Next, Copyright, Author and more. (I doubt it is actually used by more than a handful of people.)

Are there any other attributes that are useful, or other uses for the ones above? What about SEO benefit?

share|improve this question

3 Answers 3

up vote 7 down vote accepted

As far as SEO benefits nothing stands out as being truly beneficial other then canonical. The only other SEO possible benefits I can see from using the <link> tag is when using start/next/previous to indicate pages related to the current one, like in a multi-page article, to help the search engines understand the relationship between those pages. Others like glossary, index, section, and appendix look like they may have semantic meaning that can have SEO effects but they seem to be very obscure and we can only speculate if they do indeed have any value.

The only uses of link that seems to have any real world practical uses that I have seen are

  • favicon
  • start/next/previous
  • stylesheets (duh)
  • alternative (usually for style sheets but can be used for other doc types like PDFs)
  • canonical

update 2011-12-06: Google now uses <link> for specifying a language and location

share|improve this answer
    
+1 I think those are all of the big ones. –  RandomBen Sep 14 '10 at 15:21
    
+1 Though I'd revise: "alternate" is the correct relationship for related RSS feeds (particularly useful if you don't like having an "RSS" button on every page) and xl8n/i8ln versions. See also: w3.org/QA/Tips/use-links –  danlefree Sep 14 '10 at 16:25

Also be aware that not all user-agents are traditional web-browsers. I believe many screen-readers and other accessible user-agents can use the "next", "home" and "prev" links for navigation. See Dive Into Accessibility - Day 9: Providing additional navigation aids. But for pure SEO then I think "canonical" is the only really important one.

share|improve this answer

This question reminds me of something completely awesome I never knew until I got into Google Pagespeed testing, specifically how Steve Souders attacks the loading asynchronous javascript problem.

Specifically, the <SCRIPT> tag works much like the <LINK> tag. It is loading a resource. So in a way, calling an external .js file through <script src=...> is practically the same thing in a way.

The method is called menu-degrading scripts. In other words, once the resource is loaded, the inline portion of the tag gets executed. It requires a snippit of code to be placed in the source file, but it causes the inline source to be executed after it is loaded. (through some event handlers and eval( curScript.innerHTML );)

So if you have an external .js file to load, but want it to do something after it is loaded, you can do this:

<script src="menu-degrading.js" type="text/javascript">
  // something in javascript you want to do...
</script>

The gem about this, to me, is the fact that almost every external resource or <LINK> ultimately can work like this if done properly. When I first ran across this, I would have never thought to try both externally loading and in-lining a resource.

<link rel="stylesheet" type="text/css" href={somefile.css} >
/* default inline resource if not found */
.body { background:#000000;color:FFFFFF; }
/* etc... minimal defaults */
</link>

I haven't tried this yet, but inline code might work with 404 errors to create default resources when not found. If you have time to test this, let me know!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.