Skip to content
Related Articles
Open in App
Not now

Related Articles

HTML | <link> href Attribute

Improve Article
Save Article
  • Last Updated : 06 Jun, 2022
Improve Article
Save Article

The HTML <link> href Attribute is used to specify the URL of the linked document
It mostly contains the URL of the stylesheet file. 

<link href="URL"> 

Attribute Values: It contains the value i.e URL which specifies the URL of the linked document. 
Possible values are: 

  • absolute URL: It points to another website.
  • Relative URL: iT points to a file present within a website.

Example: This Example illustrates the use of href attribute in the link element. 


<!DOCTYPE html>
    <link id="linkid"
<body style="text-align:center;">
      href Attribute</h2>


Supported Browsers: The browser supported by HTML | <link>href Attribute are listed below: 

  • Google Chrome 1 and above
  • Edge 12 and above
  • Internet Explorer 6 and above
  • Firefox 1 and above
  • Opera 12.1 and above
  • Safari 4 and above
My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!