HTML rel attribute
rel
The purpose of the HTML rel attribute is to define a relationship with another document specified by the value of the href attribute of the associated element.
Pictorial presentation

Supported elements
HTML rel attribute supports a and link elements.
Syntax
<ElementName rel="value" >.....</ElementName>
Where ElementName is any supported element.
Type of value
Link type.
Value
Value(Link types) | Description |
---|---|
alternate | May be a printed page, the same document in a different language or mirror document which is an alternate version of the current document. |
stylesheet | Refers to an external style sheet for the document. |
start | Refers to the first document in a collection of documents. |
next | Refers to the next document in a series of documents. |
prev | Refers to the previous document in a series of documents. |
contents | Refer to the document which is a table of contents. |
index | Refers to the document which is the index for the current document. |
glossary | Refers to the document which contains an explanation of words used in the current document. |
copyright | Refers to the copyright information of the current document. |
chapter | Refers to a chapter of the current document. |
section | Refers to a section of the current document. |
subsection | Refers to a subsection of the current document. |
appendix | Refers to an appendix for the current document. |
help | Refers to a help document. |
bookmark | Refers to a related document. |
Supported doctypes
HTML 4.01 strict, HTML 4.01 transitional, HTML 4.01 frameset.
Example of HTML rel attribute with link element
Example of HTML rel attribute with a element
Previous: HTML readonly attribute
Next: HTML rev attribute
Test your Programming skills with w3resource's quiz.