• Skip to main content
  • Skip to search
  • Skip to select language
    • Technologies Overview
    • HTML
    • CSS
    • JavaScript
    • Graphics
    • HTTP
    • APIs
    • Browser Extensions
    • MathML
    • Learn web development
    • Tutorials
    • References
    • Developer Guides
    • Accessibility
    • Game development
    • ...more docs
    • Send Feedback
    • Contribute to MDN
    • Report a content issue 🌐
    • Report a platform issue 🌐
  1. Web technology for developers
  2. Web APIs
  3. StyleSheet
  4. StyleSheet.type
  • Change language

Table of contents

  • Syntax
  • Example
  • Specifications
  • Browser compatibility

StyleSheet.type

The type property of the StyleSheet interface specifies the style sheet language for the given style sheet.

Syntax

string = stylesheet.type

Example

 myStyleSheet.type = 'text/css';

Specifications

Specification
CSS Object Model (CSSOM)
# dom-stylesheet-type

Browser compatibility

BCD tables only load in the browser

Found a problem with this page?

  • Edit on GitHub
  • Source on GitHub
  • Report a problem with this content on GitHub
  • Want to fix the problem yourself? See our Contribution guide.

Last modified: Sep 14, 2021, by MDN contributors

Change your language

Related Topics

  1. CSS Object Model
  2. StyleSheet
  3. Properties
    1. disabled
    2. href
    3. media
    4. ownerNode
    5. parentStyleSheet
    6. title
    7. type
  4. Related pages for CSSOM
    1. AnimationEvent
    2. CSS
    3. CSSConditionRule
    4. CSSGroupingRule
    5. CSSKeyframeRule
    6. CSSKeyframesRule
    7. CSSMediaRule
    8. CSSNamespaceRule
    9. CSSPageRule
    10. CSSRule
    11. CSSRuleList
    12. CSSStyleDeclaration
    13. CSSStyleRule
    14. CSSStyleSheet
    15. CSSSupportsRule
    16. CaretPosition
    17. LinkStyle
    18. MediaQueryList
    19. MediaQueryListListener
    20. Screen
    21. StyleSheetList
    22. TransitionEvent
  • Web Technologies
  • Learn Web Development
  • About MDN
  • Feedback
  • About
  • MDN Web Docs Store
  • Contact Us
  • Firefox

MDN

  • MDN on Twitter
  • MDN on Github

Mozilla

  • Mozilla on Twitter
  • Mozilla on Instagram

© 2005-2022 Mozilla and individual contributors. Content is available under these licenses.

  • Terms
  • Privacy
  • Cookies