HOME HTML CSS JAVASCRIPT SQL PHP JQUERY XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

HTML <link> rel Attribute

HTML link Tag Reference HTML <link> tag

Example

An external stylesheet:

<link rel="stylesheet" type="text/css" href="theme.css">

Try it Yourself »

Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The rel attribute is supported in all major browsers.


Definition and Usage

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


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="W3Schools 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 Reference HTML <link> tag

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE