A link relation is a descriptive attribute attached to a hyperlink in order to define the type of the link, or the relationship between the source and destination resources. The attribute can be used by automated systems, or can be presented to a user in a different way.
In HTML these are designated with the rel attribute on link, a or area elements. Example uses include the standard way of referencing CSS <link rel="stylesheet" href="example.css"/>, which indicates that the external resource linked to with the href attribute is a stylesheet, so a web browser will generally fetch this file to render the page. Another example is rel="shortcut icon" for the popular favicon icon.
Link relations are used in some microformats (e.g. rel="tag" for tagging), in XHTML Friends Network (XFN), and in the Atom standard, in XLink, as well as in HTML. Standardized link relations are one of the foundations of HATEOAS as they allow the user agent to understand the meaning of the available state transitions in a REST system.
 rev attribute
In HTML 4, the rev attribute of a link is also defined, which defines the reversed relationship between the resources. The attribute is removed in HTML 5.
- rel values defined in HTML 4
- rel values to be defined in HTML 5
- rel values which are defined in some specification
- WHATWG blog entry on link relations
|This World Wide Web-related article is a stub. You can help Wikipedia by expanding it.|