<a attribute-name="attribute-value"></a> Name Value Description download string download the hyperlink destination href URI reference to the hyperlink destination hreflang language tag language of the hyperlink destination ping list of URIs list of URLs to notify if a user follows the hyperlink referrerpolicy no-referrer Specifies that no referrer information is to be sent along with requests to any origin. no-referrer-when-downgrade Sends a request’s full referrerURL stripped for use as a referrer for requests: whose referrerURL and current URL are both potentially trustworthy URLs, or whose referrerURL is a non-potentially trustworthy URL. origin Specifies that only the ASCII serialization of the request’s referrerURL is sent as referrer information when making both same-origin-referrer requests and cross-origin-referrer requests. origin-when-cross-origin Specifies that a request’s full referrerURL is sent as referrer information when making same-origin-referrer requests, and only the ASCII serialization of the origin of the request’s referrerURL is sent as referrer information when making cross-origin-referrer requests. same-origin Specifies that a request’s full referrerURL is sent as referrer information when making same-origin-referrer requests. strict-origin Sends the ASCII serialization of the origin of the referrerURL for requests: whose referrerURL and current URL are both potentially trustworthy URLs, or whose referrerURL is a non-potentially trustworthy URL. strict-origin-when-cross-origin | empty Specifies that a request’s full referrerURL is sent as referrer information when making same-origin-referrer requests, and only the ASCII serialization of the origin of the request’s referrerURL when making cross-origin-referrer requests: whose referrerURL and current URL are both potentially trustworthy URLs, or whose referrerURL is a non-potentially trustworthy URL. unsafe-url Specifies that a request’s full referrerURL is sent along for both same-origin-referrer requests and cross-origin-referrer requests. rel tokens relationship between the hyperlink document and the hyperlink destination target browsing-context name or keyword browsing context for the hyperlink destination type MIME type type of the hyperlink destination
a:link, a:visited
{
color: (internal value);
cursor: auto;
text-decoration: underline;
}
a:link:active, a:visited:active
{
color: (internal value);
}
<!doctype html>
<html>
<body id="myid">
<a>placeholder</a> has no reference to the hyperlink destination<br>
<a href="https://osbo.com/">absolute</a> has a full path reference to the hyperlink destination<br>
<a href="/">relative</a> has a partial path reference to the hyperlink destination<br>
<a href="#myid">bookmark</a> has a hash reference to an id within the hyperlink destination
</body>
</html>
<!doctype html>
<html>
<body>
<a href="/" hreflang="en">language</a> for the hyperlink destination is English
</body>
</html>
<!doctype html>
<html>
<body>
<a href="/" ping="/html/elements/a/">ping</a> sends notification the hyperlink was followed
</body>
</html>
<!doctype html>
<html>
<body>
<a href="/" referrerpolicy="">empty</a> corresponds to no referrer policy, causing a fallback to a referrer policy defined elsewhere, or in the case where no such higher-level policy is available, defaulting to no-referrer-when-downgrade<br>
<a href="/" referrerpolicy="no-referrer">no-referrer</a> sends no referrer information is to be sent along with requests made from a particular request client to any origin<br>
<a href="/" referrerpolicy="no-referrer-when-downgrade">no-referrer-when-downgrade</a> sends a full URL along with requests from environment settings objects whose HTTPS state is modern to a potentially trustworthy URL, and requests from clients whose HTTPS state is not modern to any origin<br>
<a href="/" referrerpolicy="origin">origin</a> sends only the ASCII serialization of the origin of the request client is sent as referrer information when making both same-origin requests and cross-origin requests from a particular client<br>
<a href="/" referrerpolicy="origin-when-cross-origin">origin-when-cross-origin</a> sends a full URL, stripped for use as a referrer, is sent as referrer information when making same-origin requests from a particular request client, and only the ASCII serialization of the origin of the request client is sent as referrer information when making cross-origin requests from a particular client<br>
<a href="/" referrerpolicy="same-origin">same-origin</a> sends a full URL, stripped for use as a referrer, is sent as referrer information when making same-origin requests from a particular client<br>
<a href="/" referrerpolicy="strict-origin">strict-origin</a> sends the ASCII serialization of the origin of the request client when making requests: from an environment settings object whose HTTPS state is modern to a potentially trustworthy URL, and from environment settings objects whose HTTPS state is not modern to any origin<br>
<a href="/" referrerpolicy="strict-origin-when-cross-origin">strict-origin-when-cross-origin</a> sends a full URL, stripped for use as a referrer, is sent as referrer information when making same-origin requests from a particular request client, and only the ASCII serialization of the origin of the request client when making cross-origin requests: from a environment settings object whose HTTPS state is modern to a potentially trustworthy URL, and from environment settings objects whose HTTPS state is not modern to any origin<br>
<a href="/" referrerpolicy="unsafe-url">unsafe-url</a> sends a full URL, stripped for use as a referrer, is sent along with both cross-origin requests and same-origin requests made from a particular client
</body>
</html>
<!doctype html>
<html>
<body>
<a href="/" rel="start">relationship</a> between the hyperlink document and the hyperlink destination<br>
<a href="/html/elements/!doctype/" rel="prev">previous</a> is the relationship between a and !doctype<br>
<a href="/html/elements/abbr/" rel="next">next</a> is the relationship between a and abbr
</body>
</html>
<!doctype html>
<html>
<body>
<a href="/">no target</a> opens the hyperlink in the current tab or window<br>
<a href="/" target="_blank">_blank</a> opens the hyperlink in a different new tab or window<br>
<a href="/" target="_parent">_parent</a> opens the hyperlink in the parent tab or window<br>
<a href="/" target="_self">_self</a> opens the hyperlink in the current tab or window<br>
<a href="/" target="_top">_top</a> opens the hyperlink in the top tab or window<br>
<a href="/" target="myname">name</a> opens the hyperlink in the same new tab or window
</body>
</html>
<!doctype html>
<html>
<body>
<a href="/" type="text/html">type</a> for the hyperlink destination is HTML
</body>
</html>
<!doctype html>
<html>
<head>
<style>
a
{
cursor: pointer;
text-decoration: underline;
}
a:link
{
color: blue;
}
a:visited
{
color: purple;
}
a:hover
{
color: green;
}
a:active
{
color: red;
}
</style>
</head>
<body>
<a href="/">anchor</a>
</body>
</html>
<!doctype html>
<html>
<body>
<script>
const myelement = document.createElement("a");
myelement.setAttribute("href", "/");
myelement.textContent = "anchor";
document.body.replaceChildren(myelement);
</script>
</body>
</html>