MIME Types Reference

text/css

The MIME type for Cascading Style Sheets used to style HTML documents.

What Is This?

The text/css MIME type indicates that the content is a Cascading Style Sheet. When a browser encounters a <link> element or @import rule with text/css, it downloads and applies the stylesheet rules to the HTML document.

Common Uses

1

External stylesheet files linked in HTML documents

2

CSS framework files (Bootstrap, Tailwind)

3

Inline <style> blocks in HTML

4

CSS preprocessor output files

Examples

Browser Support

Supported by all browsers. CSS is a core web technology.

File Extension

The .css file extension maps to text/css as its MIME type.

Related Entries

More from this reference:

Frequently Asked Questions

What happens if CSS is served with the wrong MIME type?

Browsers may refuse to apply stylesheets served with incorrect MIME types. If the Content-Type is text/plain or application/octet-stream, the browser blocks the stylesheet for security reasons.

Can I use application/x-css instead of text/css?

No. text/css is the only correct MIME type for CSS. Using application/x-css or other types may cause the browser to reject the stylesheet.