Last Updated : 06 Jun, 2022
The HTML <link> href Attribute is used to specify the URL of the linked document.
It mostly contains the URL of the stylesheet file.
Syntax:
<link href="URL">
Attribute Values: It contains the value i.e URL which specifies the URL of the linked document.
Possible values are:
Example: This Example illustrates the use of href attribute in the link element.
<!DOCTYPE html>
<html>
<head>
<link id="linkid"
rel="stylesheet"
type="text/css"
href="styles.css"
sizes="16*16"
hreflang="en-us">
</head>
<body style="text-align:center;">
<h1>GeeksForGeeks</h1>
<h2><link>
href Attribute</h2>
</body>
</html>
Output:
Supported Browsers: The browser supported by HTML | <link>href Attribute are listed below:
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4