What is CSS

Learn to code, learn web development basics, start a career in tech.

What is CSS

Last edited: Jul 3 2019

CSS stands for Cascading Style Sheets it describes how HTML elements are displayed, you could, for example, decide that all headers should have a colour green and have 40 pixels in size.

CSS is the language for describing the presentation of web pages, things like colours, layout, fonts can be styled within CSS sheets, CSS is independent of HTML this makes it easier to maintain sites.

Importance of CSS

Earlier versions of HTML introduced some tags for applying some styles to HTML Elements, this meant that you could go through many pages and for example change header colours to be any colour of your choice.

This presented big problems for developers, what happens when you decide to rebrand and change those colours? Now you have to visit every page on your site and manually change every header to match the new brand.

CSS solved this problem, the World Wide Web Consortium (W3C) created CSS to make it possible for a separate file with an extension .css to contain all the style formatting required.

Now with CSS being a separate file from HTML document, when we want to make changes, we only need to visit a single CSS file and any changes we make will automatically be applied to all HTML elements that depend on it.