# Link relation

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Link_relation
> Markdown URL: https://mediated.wiki/source/Link_relation.md
> Source: https://en.wikipedia.org/wiki/Link_relation
> Source revision: 1241538654
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

A **link relation** is a descriptive attribute attached to a [hyperlink](/source/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](/source/HTML) these are designated with the rel attribute on link, a, or area elements. Example uses include the standard way of referencing [CSS](/source/Cascading_Style_Sheets), , which indicates that the external resource linked to with the href attribute is a stylesheet, so a [web browser](/source/Web_browser) will generally fetch this file to render the page. Another example is rel="shortcut icon" for the popular [favicon](/source/Favicon) icon.[1][2]

Link relations are used in some [microformats](/source/Microformat) (e.g. rel="tag" for [tagging](/source/Tag_(metadata))), in [XHTML Friends Network](/source/XHTML_Friends_Network) (XFN), and in the [Atom standard](/source/Atom_(standard)), in [XLink](/source/XLink), as well as in HTML. Standardized link relations are one of the foundations of [HATEOAS](/source/HATEOAS) as they allow the user agent to understand the meaning of the available state transitions in a [Representational State Transfer](/source/Representational_State_Transfer) system.

The [Internet Engineering Task Force](/source/Internet_Engineering_Task_Force) (IETF) has a registry of standardized link relations,[3] and a procedure for extending it defined in RFC 5988. [HTML5](/source/HTML5) also defines valid link relations.[4]

In HTML4, the **rev attribute** of a link is also defined, which defines the relationship between the resources. The attribute is removed in [HTML5](/source/HTML5).

## Semantic Web implementation

The [RDF](/source/Resource_Description_Framework) typed links are fundamental in [LOD datasets](/source/Linked_data#Datasets) for identifying the relationship (predicate) type of [RDF triples](/source/RDF_triple), contributing to the automatic processability of machine-readable statements of the [Giant Global Graph](/source/Giant_Global_Graph) on the [Semantic Web](/source/Semantic_Web). The typed links in RDF are expressed as the value of the rdf:type property, defining the relationship type using well-established [controlled vocabulary](/source/Controlled_vocabulary) terms or definitions from LOD datasets such as

<rdf:type rdf:resource="http://schema.org/Person" />

## References

1. Dubost, Karl (October 2005). ["Web site meta data profile: favicon, …"](http://www.w3.org/2005/10/profile). World Wide Web Consortium. Retrieved 23 February 2011.

1. Dubost, Karl (24 October 2005). ["How to Add a Favicon to your Site"](http://www.w3.org/2005/10/howto-favicon). World Wide Web Consortium. Retrieved 25 February 2011.

1. [IANA link relations registry](https://www.iana.org/assignments/link-relations/link-relations.xhtml)

1. [HTML Living Standard; 4.12.4 Link types](http://www.whatwg.org/specs/web-apps/current-work/multipage/history.html#linkTypes) Web Hypertext Application Technology Working Group

## External links

- [rel values defined in HTML 4](http://www.w3.org/TR/html401/types.html#type-links)
- [rel values to be defined in HTML5](http://wiki.whatwg.org/wiki/RelExtensions)
- [rel values which are defined in some specification](http://microformats.org/wiki/existing-rel-values)
- [WHATWG blog entry on link relations](http://blog.whatwg.org/the-road-to-html-5-link-relations)

---
Adapted from the Wikipedia article [Link relation](https://en.wikipedia.org/wiki/Link_relation) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Link_relation?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
