Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.


CSS Basics Course (How To)

via Treehouse


In this course, we're going to learn the basics of CSS, one of the core technologies for designing and building websites and applications. No matter what kind of website or web application you want to build, you'll have to use CSS.

If you haven't written much CSS, or even if you’ve never written CSS at all, don’t worry. That's what this course is for. We’ll start with basic CSS concepts, then gradually progress to more advanced topics and lessons.

What you'll learn

  • Getting Started With CSS
  • Basic Selectors
  • Understanding Values and Units
  • Fundamental Concepts


Getting Started with CSS

So, what exactly is CSS and why is it considered a core web technology? CSS stands for Cascading Style Sheets and is a stylesheet language used to describe the presentation of web pages.

Chevron 7 steps
  • Introduction to CSS


  • Adding CSS to HTML: Inline Styles


  • Adding CSS to HTML: Internal Styles


  • Quiz: Intro to CSS

    5 questions

  • Adding CSS to HTML: External Stylesheets


  • instruction

    Keeping Up with CSS

  • Quiz: Keeping Up with CSS

    5 questions

Basic Selectors

In our previous stage, we saw a bit of CSS in action, but now it’s time to learn the parts of the language. Writing CSS means learning how to write CSS rules, which tell browsers how to render HTML elements.

Chevron 11 steps
  • Introducing CSS Selectors


  • Type Selectors

    4 objectives

  • ID Selectors


  • Class Selectors


  • ID and Class Selectors

    6 objectives

  • Descendant Selectors


  • Descendant Selectors

    3 objectives

  • Pseudo-classes


  • Pseudo-classes

    3 objectives

  • Using Comments in CSS


  • Quiz: Basic Selectors

    7 questions

Understanding Values and Units

Every CSS property has a set of values it can accept. For example, we can use keywords that literally describe a value, like the color name "blue," or the words "auto" and "hidden." A value can also be described as a number, a length, an image, or a URL.

Those values are categorized into what are called data-types, and there are lots to choose from. Again, we don't have to remember every CSS data-type and value out there. All we need is a good reference. I'll show you a good reference, then cover the common values and units CSS properties accept.

Chevron 8 steps
  • Common Data Types


  • Pixel Units


  • Percentages


  • Pixels and Percentages

    3 objectives

  • Em and Rem Units


  • Em and Rem Units

    3 objectives

  • Color Values


  • Quiz: Values and Units

    5 questions

Fundamental Concepts

Well done. You’ve learned quite a bit about working with stylesheets. You’ve learned the benefits of keeping your styles in an external file. You’ve learned some important resources for keeping your skills sharp. You’ve worked with a variety of selectors, properties, and values.

In this stage, we learn about the CSS Cascade, how inheritance works in CSS, and how to validate our CSS files.

Chevron 5 steps
  • The Cascade: Origin and Importance


  • The Cascade: Specificity and Source Order


  • Inheritance


  • Validation


  • Quiz: Fundamental Concepts

    6 questions

Taught by

Anwar Montasir


Start your review of CSS Basics Course (How To)

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.