w3-video.com logo

HTML5 Tutorial

Home HTML5 XAMPP .htaccess Firefox Notepad++

Share it

a rel attribute

The rel attribute on the a element:

The values of the rel attribute on a element:


5.rel=alternate, author, bookmark, help
license, next, nofollow, noreferrer
prefetch, prev, search, tag
<a href="http://site_user.com" rel="nofollow"> ... <⁄a>

Video demonstration a rel attribute

HTML5 a rel attribute Tutorial

min video details
00:08 video tutorial: a element, rel attribute
objective: understanding rel attribute
00:16 the rel attribute:
- is optional
- can be used only if href attribute is present
- allows you to specify the relationship between the linked resource and the current document (the type of the link)
00:22 this video demo presents only 1 value: the nofollow value ⁄keyword only
00:25 href attribute is presents on the a element → we can add the rel attribute also to it
00:30 saying you're allowing comments on your website -blog; the users, besides comments, can add links too;

the question is: Do you want search engines to follow that link?
00:40 you don't know what's on that page, whether is trustful or not...

you'll probably want to advise the search engine spiders not to follow that link
00:46 How to do that ?

Answer: use rel attribute, value nofollow
01:04 the attribute and its value has been added to a element → the search engine spiders now know NOT TO FOLLOW the mywebpage.php
a intro a browser display a parents - childrena content model: transparenta warninga syntaxa download attributea href attributea hreflang attributea target attributea type attributea itemprop attribute