---
title: "HTML a Tag rel Attribute Tutorial"
url: https://weworkworldwide.com/tutorials/html-a-tag-rel-attribute-tutorial/
description: "HTML a Tag rel Attribute Tutorial: In this section we will learn what rel attribute is and how it works in HTML. What is rel Attribute in HTML Tag?"
date: 2026-10-08T13:00:04+00:00
source: https://weworkworldwide.com/llms.txt
---

# HTML a Tag rel Attribute Tutorial

In this section we will learn what rel attribute is and how it works in HTML.

## What is rel Attribute in HTML <a> Tag?

The rel attribute in HTML <a> tag as well as a couple of other HTML elements like <link> etc. is used to set the relation between the current document and the target linked document.

For example if the linked document referring to the author of the current document, then we set the value of the `rel` attribute to “author”.

Or let’s say the linked document is an alternate version of the current document (for example it’s a ready to be printed version of the current document), so in that case the value of the `rel` attribute would be “alternate”.

## HTML rel Attribute in <a> Tag Syntax:

``` line-numbers
<a rel = "value">
```

## <a> Tag rel Attribute Values

In the table below you can see the list of values for the rel attribute:

[TABLE]

## Example: using rel attribute in HTML <a> tag

``` line-numbers
<!DOCTYPE html>
<html>
<head>
<title>HTML is fun :)</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<a href="https://www.advertisement-website.com/ads" rel="nofollow">Paid Link</a>
</body>
</html>
```

In this example, I’ve set the value of the `rel` attribute to “nofollow” because I’m linking to a website that paid for this link to appear on this webpage (hypothetically). So essentially I’m telling search engines that this link should not be checked because my website does not endorse it.
