A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.cdn.mozilla.net/en-US/docs/Web/API/HTMLLinkElement/hreflang below:

HTMLLinkElement: hreflang property - Web APIs

HTMLLinkElement: hreflang property

Baseline Widely available

The hreflang property of the HTMLLinkElement interface is used to indicate the language and the geographical targeting of a page. This hint can be used by browsers to select the more appropriate page or to improve SEO.

It reflects the hreflang attribute of the <link> element and is the empty string ("") if there is no hreflang attribute.

Value

A string that contains a language tag, or the empty string ("") if there is no hreflang attribute.

Example
<link
  rel="alternate"
  href="www.example.com/fr/html"
  hreflang="fr"
  type="text/html"
  title="French HTML" />
<p class="tag"></p>
.tag {
  margin-left: 20px;
  font-weight: bold;
  font-size: 24px;
}
const myLink = document.querySelector("link");
const pTag = document.querySelector(".tag");
pTag.textContent = myLink.hreflang;
Results Specifications Browser compatibility See also

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