Section E.3. Link Relationships


E.3. Link Relationships

The most common use of link relationships in HTML is to link to a style sheet (as explained in Chapter 16). In doing so, the author uses the rel attribute to communicate that the resource "over there" (referenced by the HRef attribute) is a "style sheet" for the current document. HTML 4 specifically allows for web authors to create and use their own link relationship values, and suggests using a profile to define them. Several popular new link relationship values have emerged to describe, for example, social network relationships between people, licenses for documents, and "tags" for blog posts. Many of these are quickly becoming de facto standards and have been documented as microformats.

E.3.1. XHTML Friends Network

Since the previous edition of this book, blogs and the larger blogging phenomenon have taken the Web by storm. As of this writing, there were approximately 22.6 million blogs according to real-time search engine Technorati (technorati.com). Many of these bloggers publish lists of links to blogs they themselves read, called blogrolls . Some indicate the relationship to the people in their blogrolls using symbols, such as asterisks (*) next to people they have met. Typical blogrolls are published as a list of hyperlinks:

 <ul>  <li><a href="http://molly.example.com">Molly*</a></li>  <li><a href="http://jeff.example.com">Jeff*</a></li> </ul> 

In 2003, a few web developers proposed a standard called the XHTML Friends Network (XFN) for explicitly indicating social relationships using new rel attribute values on blogroll links. In the above example, to indicate that Molly is a colleague you have met and Jeff is a friend you have also met, simply add XFN values to rel attributes:

 <ul>  <li><a rel="colleague met" href="http://molly.example.com">Molly</a></li>  <li><a rel="friend met" href="http://jeff.example.com">Jeff</a></li> </ul> 

For a full list of XFN relationship values and more information on using XFN, see the XFN home page at gmpg.org/xfn/.

E.3.2. Other Link Relationships

XFN was the first such popular extension of the rel attribute, and others followed soon after. The Creative Commons is a non-profit organization that encourages authors and artists to share their digital works using a standard set of online licenses. Authors can indicate that a document is published under a Creative Commons license by linking from the document to the license and adding a rel attribute with value of license:

 <a rel="license" href="http://creativecommons.org/licenses/by/2.5/">...</a> 

Search engines, including both Yahoo! and Google, recognize such license links and offer the ability to search for content available under such licenses.

The practice of visibly "tagging " content on the Webin particular, links and photosinspired the creation of the tag relationship value to indicate that the destination of a link represents a "tag" for the current document or portion thereof. A blog post can be tagged as being about "CSS" by including the following visible tag link inside the contents of the post:

 <a rel="tag" href="http://technorati.com/tag/css">CSS</a> 

Newer search engines, such as Technorati and Ice Rocket , recognize such tag links and have incorporated tagged content into their search results and other services.

To help combat web spam, publishers and search engine companies developed the nofollow extension. Many automatic and third-party generated hyperlinks are published with rel="nofollow", which search engines use to afford less weight to those links.

XFN and new link relationships were the beginning of a larger movement by web authors to convey more semantic meaning, in a way that is easy to learn, write, and style with CSS. For example, links with relationships can be styled with CSS attribute selectors described in Chapter 17.




Web Design in a Nutshell
Web Design in a Nutshell: A Desktop Quick Reference (In a Nutshell (OReilly))
ISBN: 0596009879
EAN: 2147483647
Year: 2006
Pages: 325

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net