You are here: Reference > HTML > attributes > rel (a, link)

rel attribute (a, link)

Browser support:
Specifies the relationship between the current document and the destination of an anchor or link.
This attribute contains information for the author only, there isn't any functionality assigned to this attribute.
JavaScript page for this attribute: rel. You can find other example(s) there.

Possible values:

String that sets a space-separated list of relation types.
The list of the supported relation types:
Alternate
Designates substitute versions for the document in which the link occurs.
Appendix
Page that is an appendix for the set of pages.
Bookmark
Bookmark.
Chapter
Refers to a document serving as a chapter in a collection of documents.
Contents
Refers to a document serving as a table of contents.
Copyright
Copyright notice.
Glossary
Glossary for the page.
Help
Help document.
Index
Refers to a document providing an index for the current document.
Next
Refers to the next document in a sequence.
Nofollow
Instruct search engines that the current document has no effect on the page ranking of the linked document.
Offline
Location that contains a path to the CDF file.
Prev
Refers to the previous document in a sequence.
Search
Referes to an XML file in OpenSearch description format.
Section
Page that is a section for a set of pages.
Shortcut Icon
Refers to an icon location.
sidebar
Refers to the bookmarks panel. Only works with Opera and Firefox.
Start
Refers to the first document.
Stylesheet
Refers to an external style sheet.
Subsection
Page that is a subsection for a set of pages.
Default: this attribute has no default value.

Example HTML code 1:

This example illustrates the use of the rel attribute:
Code
style.css
<head>
    <link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
    Some text content
</body>
Did you find this example helpful? yes no

Example HTML code 2:

This example shows how to tell the client's browser that you offer a search plugin from HTML. If the search provider is currently installed it will be selected search engine. Note that the AddSearchProvider method provides similar functionality in JavaScript.
Code
searchProvider.xml
<head>
    <link rel="search" type="application/opensearchdescription+xml" href="searchProvider.xml" title="Dottoro Search" /> 
</head>
<body>
    Please open the drop-down menu of your browser's Search Box.
</body>
Did you find this example helpful? yes no

Supported by tags:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content