HTML <link> href Attribute

❮ HTML <link> tag

Example

<head>
  <link rel="stylesheet" href="demo.css">
</head>

Meaning

The href attribute specifies the URL of the linked resource. A URL might be absolute or relative.


Standard Syntax

HTML: <link href="URL">

XHTML: <link href="URL" />



Browser Support




Status







Attribute Values

Value Description
URL

Value can be

  • An absolute URL - destination to within or another web site ( href="http://www.example.com/index.html")
  • A relative URL - destination to within a web site ( href="index.html")
❮ HTML <link> tag