Learn HTML5, Defining link relationships

So far, we’ve explored how HTML5 allows us to describe the contents of our documents in more meaningful ways In this exercise, we’re gonna focus on how HTML5 also allows us to define the relationships between pages and the resources and the content that they link to.

By using the rel attribute on links, anchors and area elements, you can create sites that provide additional information about linked resources and even influence how user agents handle them.

Before we put this into practice, let’s jump out into the specifications for just one moment Here I am in the HTML5 specification, and I have browsed to section 4.8.1, Links created by the a and area elements.

Now, the rel attribute can be used by anchor elements, the a elements, area elements, as well as the link element, which is bringing in external resources If I peruse down a little bit, I can see that “The rel attribute “on a and area elements controls “what kinds of links the elements create.

“The attribute’s value must be “a set of space-separated tokens.

Leave a Reply

Notify of