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/HTMLStyleElement/sheet below:

HTMLStyleElement: sheet property - Web APIs

HTMLStyleElement: sheet property

Baseline Widely available

The read-only sheet property of the HTMLStyleElement interface contains the stylesheet associated with that element.

An StyleSheet is always associated with a HTMLStyleElement, unless its type attribute is not text/css.

Value

A StyleSheet object, or null if none is associated with the element.

Examples

Suppose the <head> contains the following:

<style id="inline-style">
  p {
    color: blue;
  }
</style>

The sheet property of the associated HTMLStyleElement object will return the StyleSheet object describing it.

const style = document.getElementById("inline-style");
console.log(style.sheet.cssRules[0].cssText); // 'p { color: blue; }'
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