Skip to content

Help us create more tutorials! Make a donation using the Donate button or become a member using the button below to hide this banner and track your progress.

Why should I use CSS?

Summary

CSS is a language used to change the colors, fonts, and layout of a webpage.

Details

CSS stands for Cascading Style Sheets. It’s a stylesheet language that’s used to style web pages. You can use it to change the colors on a web page, the fonts, and the layout of the page, among other things.

Here’s a sample of CSS code:

p {
  color: red;
  background-color: blue;
  font-size: 20px;
  font-family: Arial, sans-serif;
}

There might be some symbols here that are foreign to you, but hopefully you can recognize the different properties that are being modified and the values being used to modify them. The properties in this example are color, background-color, font-size, and font-family, while the values are red, blue, 20px, and Arial, sans-serif. Don’t worry about understanding everything yet if you’re new to CSS. We’ll break down the syntax of CSS and many of these properties and values in our other CSS lessons.

Here is a demo of what the above CSS code would do to a paragraph element:

CSS is usually the second language a web developer learns, after HTML.

Main concepts

Here are some of the main concepts you’ll learn in this course:

  • Selectors
  • Properties
  • Values
  • div element
  • span element
  • Cascade
  • Specificity
  • Inheritance

Exercises

You can download exercises to go along with these tutorials on our CSS exercises repository on GitHub. Just click the green Code button in the corner and click the Download ZIP option.

Each module has a folder. Inside each module folder is a folder for each lesson. The lesson folders usually contain files already where you can put your code, although occassionally you will be asked to create files on your own.

NOTE: You can ignore the instructions included in the folders. The instructions are now listed directly in the lessons.

References

CSS on MDN

Back to: CSS Course > CSS Introduction