Web & code · .css
What Is a CSS File?
A .css file is a stylesheet that controls how a web page looks.
- Extension
- .css
- Full name
- Cascading Style Sheets
- Type
- Web & code
- MIME type
- text/css
- Developed by
- W3C (1996)
Free CSS Tools
These run in your browser. Your CSS files are never uploaded.
About CSS Files
CSS files contain rules that set the colours, fonts, spacing, layout and animations of web pages. A rule selects elements, such as all headings, and gives them properties, such as font-size. Keeping styles in a separate CSS file lets one stylesheet control the look of a whole website. Like HTML, CSS is plain text and can be edited in any text editor.
How to Open a CSS File
- Any device
- Open it in a text editor, VS Code or a browser to read it.
CSS File Questions
How do I use a CSS file?
Link it from an HTML page with <link rel="stylesheet" href="style.css"> in the head.
Why do CSS changes not show up?
The browser may be using a cached copy. Do a hard reload with Ctrl+Shift+R, or Cmd+Shift+R on a Mac.