Please note, this is a STATIC archive of website www.w3schools.com from 05 May 2020, cach3.com does not collect or store any user information, there is no "phishing" involved.
THE WORLD'S LARGEST WEB DEVELOPER SITE

HTML <link> href Attribute

❮ HTML <link> tag

Example

Link to an external stylesheet:

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

Definition and Usage

The href attribute specifies the location (URL) of the external resource (most often a style sheet file).


Browser Support

Attribute
href Yes Yes Yes Yes Yes

Syntax

<link href="URL">

Attribute Values

Value Description
URL The URL of the linked resource/document.

Possible values:

  • An absolute URL - points to another web site (like href="https://www.example.com/theme.css")
  • A relative URL - points to a file within a web site (like href="/themes/theme.css")

❮ HTML <link> tag