// Tutorial //

How To Use the Rel Attribute for Anchor Tags in HTML

Published on September 12, 2016 · Updated on October 12, 2020
    Default avatar

    By Alligator.io

    How To Use the Rel Attribute for Anchor Tags in HTML


    The rel attribute inside anchor tags (<a>) describes the relation of a linked resource. rel can take one of 14 values. Let’s examine them all:


    Using the rel Attribute Inside Anchor Tags

    Here are the 14 values that the rel attribute can accept:

    • alternate: Points to an alternate version of the document.
    • author: Points to the author of the document.
    • bookmark: Points to an URL for bookmarking.
    • enclosure: Points to a downloadable asset.
    • external: Points to an URL on a different domain.
    • help: Points to an help document.
    • license: Points to legal, license, or copyright information.
    • next: Points to the next document in a series.
    • nofollow: Indicates to search engines that the document in not endorsed. This is the most commonly used value and should be used for paid links and ads.
    • noreferrer: Indicates to the browser not to send an HTTP referrer header.
    • noopener: Prevent an opener browsing context. It should be used when using target="\_blank" on a link. Mathias Bynens discussed the security benefits of this and Jake Archibald discussed the performance benefits.
    • prev: Points to the previous document in a series.
    • search: Points to a search function for the document.
    • tag: Points to a document that’s covers a keyword/tag of the current document.


    The rel attribute is an important feature of HTML. See our related tutorial on the Rel Attribute for Link Tags

    For a more comprehensive review of the HTML5 markup language, explore our series, How To Build a Website in HTML.

    Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.

    Learn more about us

    About the authors
    Default avatar


    Still looking for an answer?

    Ask a questionSearch for more help

    Was this helpful?
    Leave a comment

    This textbox defaults to using Markdown to format your answer.

    You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

    Try DigitalOcean for free

    Click below to sign up and get $200 of credit to try our products over 60 days!

    Sign up

    card icon
    Get our biweekly newsletter

    Sign up for Infrastructure as a Newsletter.

    Sign up
    card icon
    Hollie's Hub for Good

    Working on improving health and education, reducing inequality, and spurring economic growth? We’d like to help.

    Learn more
    card icon
    Become a contributor

    You get paid; we donate to tech nonprofits.

    Learn more
    Welcome to the developer cloud

    DigitalOcean makes it simple to launch in the cloud and scale up as you grow – whether you’re running one virtual machine or ten thousand.

    Learn more ->
    DigitalOcean Cloud Control Panel
    Get started for free

    Enter your email to get $200 in credit for your first 60 days with DigitalOcean.

    New accounts only. By submitting your email you agree to our Privacy Policy.

    © 2023 DigitalOcean, LLC.