Category: Text

text/css

text/css instructs browsers to parse the file as styling rules. In strict mode, modern browsers will refuse to load stylesheets with non-text/css MIME types.

MIME / CONTENT-TYPE

text/css

ASSOCIATED EXTENSIONS

.css

PRIMARY CATEGORY

Text

HTTP Headers & Web Server Configurations

Standard HTTP Response Header
Content-Type: text/css; charset=utf-8

Send this exact header in HTTP responses to instruct browsers how to decode and render the payload.

Node.js / Express / Web API
res.setHeader("Content-Type", "text/css; charset=utf-8"); res.setHeader("X-Content-Type-Options", "nosniff");
NGINX Configuration (mime.types)
types { text/css css; }
Apache (.htaccess / httpd.conf)
AddType text/css .css

Security Advisory & Hardening

With `X-Content-Type-Options: nosniff`, browsers will strictly refuse to apply stylesheets that do not match `text/css`.

Frequently Asked Questions

text/css Questions & Answers

Common questions regarding MIME types, Content-Type headers, and web server configurations.

The standard HTTP response header is: "Content-Type: text/css; charset=utf-8".