.CSS File Extension
What is a CSS file?
A CSS file is a cascading style sheet (CSS) file used to format the contents of a webpage. It contains customized global properties for how to display HTML elements. For example, CSS files can define the size, color, font, line spacing, indentation, borders, and location of HTML elements.
CSS was initially released in 1996 and is currently developed by the World Wide Web Consortium (W3C).
Web developers and designers utilize CSS files to create a similar appearance across webpages on a site. By storing display properties for multiple pages in a single file, CSS files also reduce the amount of work and generated HTML code.
Any webpage that references the CSS file will be modified based on the properties in the CSS file. For example, a designer may want to change the font and add padding for text across 200 pages on his site. If the pages reference the same CSS file, he only needs to change the one CSS file instead of 200 separate pages.
CSS syntax is simple and primarily consists of selectors and declaration blocks. The selector identifies the HTML element to be styled, and the declaration block consists of one or more declarations separated by semicolons. The declarations include CSS property names, a colon, and the value for the property.
How do I open a CSS file?
You can open and edit CSS files with various web development applications and source code editors. Examples of programs that support CSS files include Adobe Dreamweaver (Windows and macOS), Adobe ColdFusion Builder (Windows and macOS), and Microsoft Visual Studio Code (multiplatform).
Since CSS files are saved in plain text, you can also open them with text editors, including Microsoft Notepad (bundled with Windows) and Apple TextEdit (bundled with macOS). However, you should use web development tools or source code editors to edit CSS files, if possible, because they provide more advanced features, such as syntax highlighting.