rel-alternate: Difference between revisions
m (simplify heading) |
Kevin Marks (talk | contribs) m (→special combinations: use 'alternative' in prose as 'alternate' means something else) |
||
Line 2: | Line 2: | ||
== special combinations == | == special combinations == | ||
While rel="alternate" does by itself mean that the destination is some | While rel="alternate" does by itself mean that the destination is some alternative representation or version of the current page, it combines in special ways with other rel values and other attributes to provide different more specific meanings, in particular: | ||
=== with rel stylesheet === | === with rel stylesheet === | ||
==== alternate style sheets ==== | ==== alternate style sheets ==== | ||
<code>rel="alternate stylesheet"</code> is [http://www.w3.org/TR/html4/present/styles.html#h-14.3.1 how you provide an | <code>rel="alternate stylesheet"</code> is [http://www.w3.org/TR/html4/present/styles.html#h-14.3.1 how you provide an alternative style sheet] for the document, and note that the style sheet is NOT an alternative representation of the current page. | ||
=== with hreflang === | === with hreflang === |
Revision as of 18:50, 11 August 2011
This article is a stub. You can help the microformats.org wiki by expanding it.
special combinations
While rel="alternate" does by itself mean that the destination is some alternative representation or version of the current page, it combines in special ways with other rel values and other attributes to provide different more specific meanings, in particular:
with rel stylesheet
alternate style sheets
rel="alternate stylesheet"
is how you provide an alternative style sheet for the document, and note that the style sheet is NOT an alternative representation of the current page.
with hreflang
alternate language versions
when present with an explicit hreflang
attribute (with a value other than that of the document itself), rel="alternate" means a link to a version of the current document but in the language indicated by the hreflang attribute.
Example from http://gmpg.org/xfn/creator :
<link href="creator-fr" rel="alternate" hreflang="fr" title="Créateur XFN 1.1" />
with media
alternate devices and media
when present with an explicit media
attribute, rel="alternate" means a link to a version of the current document especially for the specified device or medium indicated by the media attribute.
Example, linking to a mobile version of a site:
<a href="http://m.twitter.com" rel="alternate" media="handheld">Twitter mobile site</a>
with type
feed for the page
when present with an explicit type
attribute (with a value other than that of the document itself, e.g. other than "text/html"), rel="alternate" means a link to a representation of the contents of the current document in a different format as designated by the type attribute.
Examples:
<link rel="alternate" type="application/rss+xml" href=".rss"
title="RSS feed for this page"/>
<link rel="alternate" type="application/atom+xml" href=".atom"
title="Atom feed for this page"/>
<link rel="alternate" type="application/activitystream+json" href=".as"
title="Activity Streams JSON feed for this page"/>
with type and rel home
feed for the site
Proposed: when present with an explicit type
attribute (with a value other than that of the document itself, e.g. other than "text/html"), rel="alternate home" means a link to a representation of the contents of the site (the home page for the current page) in a different format as designated by the type attribute.
Examples:
<link rel="alternate home" type="application/rss+xml" href=".rss"
title="RSS feed for this site"/>
<link rel="alternate home" type="application/atom+xml" href=".atom"
title="Atom feed for this site"/>
<link rel="alternate home" type="application/activitystream+json" href=".as"
title="Activity Streams JSON feed for this site"/>
see also
- existing-rel-values
- rel-faq
- rel-home, in particular rel-home with rel-alternate proposal