Latest

recent

HTML Link href attribute

Example

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


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.

Syntax

<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="http://www.example.com/theme.css")
  • 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.