Latest web development tutorials
 

HTML <link> rel Attribute

< HTML <link> tag

Example

An external stylesheet:

<link rel="stylesheet" type="text/css" href="theme.css">
Try it Yourself »

Definition and Usage

The required rel attribute specifies the relationship between the current document and the linked document/resource.


Browser Support

Attribute
rel Yes Yes Yes Yes Yes

Differences Between HTML 4.01 and HTML5

Some HTML 4.01 values are removed from HTML5, and some new values are added to HTML5.


Syntax

<link rel="value">

Attribute Values

Value Description
alternate Links to an alternate version of the document (i.e. print page, translated or mirror).
Example: <link rel="alternate" type="application/atom+xml" title="w3ii News" href="/blog/news/atom">
author Links to the author of the document
help Links to a help document.
Example: <link rel="help" href="/help/">
icon Imports an icon to represent the document.
Example: <link rel="icon" href="/favicon.ico" type="image/x-icon">
license Links to copyright information for the document
next Indicates that the document is a part of a series, and that the next document in the series is the referenced document
prefetch Specifies that the target resource should be cached
prev Indicates that the document is a part of a series, and that the previous document in the series is the referenced document
search Links to a search tool for the document
stylesheet URL to a style sheet to import

< HTML <link> tag