HTML Link href attribute


In the following example, the href attribute points to the location of an external style sheet:
<link rel="stylesheet" type="text/css" href="theme.css" />

Definition and Usage

The href attribute specifies the location (URL) of a linked document.

Browser Support

The href attribute is supported in all major browsers.

Tips and Notes

Tip: All URLs should be URL-encoded when required.


<link href="value" />

Attribute Values

Value Description
URL The URL of the linked document.Possible values:
  • An absolute URL - points to another web site (like href="")
  • A relative URL - points to a file within a web site (like href="/themes/theme.css")
HTML Link href attribute Reviewed by 1000sourcecodes on 02:27 Rating: 5
Powered by Blogger.