TextText-based

text/css

CSS

Reference for text/css, the MIME type for Cascading Style Sheets that control the visual presentation of web pages.

MIME Type Detector

Drop a file to detect its MIME type — no upload, runs in your browser

📄

Drop any file here or click to choose

Expected extensions: .css

HTTP Content-Type Header

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

Associated File Extensions

.css

Quick Facts

MIME Typetext/css
CategoryText
TypeText-based (human-readable)
Extensions.css

Common Usage

CSS defines the visual styling of HTML documents — layout, colors, fonts, animations, and responsive design. Browsers require the correct MIME type to apply stylesheets.

CSS files are served by web servers, bundled by build tools, and cached by CDNs.

Code Examples

HTML
<!-- Link or embed with explicit type -->
<link rel="stylesheet" href="file.css" type="text/css">

<!-- Or for script/media elements -->
<script type="text/css" src="file.css"></script>
Node.js
// Express.js
app.get('/file', (req, res) => {
  res.type('text/css');
  res.send(data);
});

// Node.js http
res.writeHead(200, { 'Content-Type': 'text/css' });
nginx
# nginx.conf — add to types block or use default
types {
    text/css  css;
}

# Or set for a specific location
location /api/ {
    default_type text/css;
}

Related MIME Types

More Text MIME Types

Other text types in the Text family

Related Tools

Explore More MIME Types

Browse our complete reference of 185 MIME types with usage examples, HTTP headers, and code snippets.