Anchor Object
The rel property sets or returns the value of the rel attribute of a link.
The rev property sets or returns the value of the rev attribute of a link.
The rel attribute specifies the relationship between the current document and the linked document.
The rev attribute specifies the relationship between the linked document and the current document.
Set the rel property:
Set the rev property:
Return the rel property:
Return the rev property:
Both properties can have one of the following values:
| Value | Description |
|---|---|
| alternate | An alternate version of the document (i.e. print page, translated or mirror) |
| stylesheet | An external style sheet for the document |
| start | The first document in a selection |
| next | The next document in a selection |
| prev | The previous document in a selection |
| contents | A table of contents for the document |
| index | An index for the document |
| glossary | A glossary (explanation) of words used in the document |
| copyright | A document containing copyright information |
| chapter | A chapter of the document |
| section | A section of the document |
| subsection | A subsection of the document |
| appendix | An appendix for the document |
| help | A help document |
| bookmark | A related document |
| nofollow | "nofollow" is used by Google, to specify that the Google search spider should not follow that link (mostly used for paid links) |
| licence | |
| tag | |
| friend |
![]()
The rel and rev properties are supported in all major browsers.
Note: Browsers do not use these properties in any way. However, search engines can use these properties to get more information about a link.
Return the relationship between the current document and the linked document:
The output of the code above will be:
Anchor Object
The perfect solution for professionals who need to balance work, family, and career building.
More than 10 000 certificates already issued!
The HTML Certificate documents your knowledge of HTML.
The CSS Certificate documents your knowledge of advanced CSS.
The JavaScript Certificate documents your knowledge of JavaScript and HTML DOM.
The jQuery Certificate documents your knowledge of jQuery.
The XML Certificate documents your knowledge of XML, XML DOM and XSLT.
The ASP Certificate documents your knowledge of ASP, SQL, and ADO.
The PHP Certificate documents your knowledge of PHP and SQL (MySQL).
| WEB HOSTING |
|---|
| Best Web Hosting |
| PHP MySQL Hosting |
| Best Hosting Coupons |
| UK Reseller Hosting |
| Cloud Hosting |
| Top Web Hosting |
| $7.95/mo SEO Hosting |
| Premium Website Design |
| WEB BUILDING |
|---|
| Download XML Editor |
| FREE Website BUILDER |
| Free Website Templates Free CSS Templates |
| Make Your Own Website |
| W3SCHOOLS EXAMS |
|---|
|
Get Certified in: HTML, CSS, JavaScript, XML, PHP, and ASP |
| W3SCHOOLS BOOKS |
|---|
|
New Books: HTML, CSS JavaScript, and Ajax |
| STATISTICS |
|---|
|
Browser Statistics Browser OS Browser Display |
| SHARE THIS PAGE |
|---|