Name
Style — an HTML <style> element
Inherits from
Node, Element
Synopsis
A Style object represents an HTML <style> tag.
Properties
booleandisabledSet this property to
trueto disable the stylesheet associated with this<style>element, and set it tofalseto re-enable it.stringmediaThis property mirrors the HTML
mediaattribute and specifies the mediums to which the specified styles apply.booleanscopedThis property is
trueif the HTMLscopedattribute is present on the<style>element, andfalseotherwise. At the time of this writing, browsers do not support scoped stylesheets.readonly CSSStyleSheetsheetThe CSSStyleSheet defined by this
<style>element.stringtitleAll HTML elements allow a
titleattribute. Setting this attribute or property on a<style>element may allow the user to select the stylesheet (as an alternate stylesheet) by title, and the title you specify may appear within the web browser UI in some fashion.stringtypeMirrors the HTML
typeattribute. The default value is “text/css”, and you do not normally need to set this attribute.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access