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

HTML <link> href Attribute

HTML link Tag Reference HTML <link> tag

Example

Link to 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 href attribute is supported in all major browsers.


Definition and Usage

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


Differences Between HTML 4.01 and HTML5

NONE.


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="http://www.example.com/theme.css")
  • A relative URL - points to a file within a web site (like href="/themes/theme.css")


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