DEV Community

Charity Parks
Charity Parks

Posted on

What is CSS?

What is CSS? First off it stands for Cascading Style Sheets. It is responsible for styling web pages as far as colors, fonts, backgrounds and layouts making the viewer experience more appealing. So its the FUN STUFF!

CSS can be used as an additional feature to HTML or independently. When using CSS with HTML it takes an HTML element and describes how it should be displayed to the user. CSS rule contains two parts: the selector and the declaration. Here is an example how it is written...

p {
font-family: Arial;}

The 'p' is the selector and the content between the {} is the declaration. Declarations have a property and a value. The paragraphs on this web page would use the Arial font. Here is another example...

h1 {
font-family: Tahoma;
color: blue;}

In this example the h1 elements will have a font of Tahoma and the color will be blue. The property is 'color' and the value is 'blue'.

There are countless properties! So many ways to design your web pages and create a great product!

Happy Coding!

Discussion (0)