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/StyleSheet/href below:

StyleSheet: href property - Web APIs

StyleSheet: href property

Baseline Widely available

The href property of the StyleSheet interface returns the location of the style sheet.

This property is read-only.

Value

A string containing the stylesheet's URI.

Examples

Assume the <head> contains the following:

<link rel="styleSheet" href="example.css" />

Then, if you open the HTML page via a file:// URL on Windows, and run the following script:

console.log(document.styleSheets[0].href);

The result looks like: "file:////C:/Windows/Desktop/example.css".

Notes

If the style sheet is a linked style sheet, the value of its attribute is its location. For inline style sheets, the value of this attribute is null.

Specifications Browser compatibility

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