HTML - attributes - rel

revision:


Content

"rel" attribute : specifies relationship between documents syntax some examples


"rel" attribute : specifies relationship between documents

top

The rel attribute specifies the relationship between the current document and the linked document and is only used if the "href" attribute is present. Search engines can use this attribute to get more information about a link!

Supported HTML tags: <a> and link elements, such as <area>, <link> and <form>.

Multiple relationships can be defined by separating values with a space.


syntax

top

<element rel="value"></element>

alternate: provides a link to an alternate representation of the document (i.e. print page, translated or mirror);
author: provides a link to the author of the document;
bookmark: permanent URL used for bookmarking;
external: indicates that the referenced document is not part of the same site as the current document;
help: provides a link to a help document;
license: provides a link to licensing information for the document;
next: provides a link to the next document in the series;
nofollow: links to an unendorsed document, like a paid link; ("nofollow" is used by Google, to specify that the Google search spider should not follow that link);
noopener: requires that any browsing context created by following the hyperlink must not have an opener browsing context;
noreferrer: makes the referrer unknown. No referer header will be included when the user clicks the hyperlink;
prev: the previous document in a selection;
search: links to a search tool for the document;
stylesheet: refers to an external style sheet for the document;
tag: a tag (keyword) for the current document.


some examples

top

my website

Cheap Flights

codes:
                    <link rel='stylesheet' href='test.css' type='text/css'> 
                    <p class="spec"><a rel='external' href='https://www.lwitters.com/index.php'>my website</a></p>
                    <p class="spec"><a rel="nofollow" href="http://www.functravel.com/">Cheap Flights</a></p>
                

Styled with CSS from the stylesheet.

codes:

                    <link rel="stylesheet" href="/tutorial/style.css">
                    <p class="spec aliceblue">Styled with CSS from the stylesheet.</p>