# Learn CSS


An evergreen CSS course and reference to level up your web styling expertise.  


Go back

## Welcome to Learn CSS!

<button class="toggle gc-analytics-event" data-category="devsite-playlist: toggle button"> *keyboard_arrow_down* *keyboard_arrow_up* </button> Article

An evergreen CSS course and reference to level up your web styling expertise.

[Read article](https://web.dev/learn/css/welcome.md.txt)

## Box Model

<button class="toggle gc-analytics-event" data-category="devsite-playlist: toggle button"> *keyboard_arrow_down* *keyboard_arrow_up* </button> Article

Everything displayed by CSS is a box. Understanding how the CSS Box Model works is therefore a core foundation of CSS.

[Read article](https://web.dev/learn/css/box-model.md.txt)

## Selectors

<button class="toggle gc-analytics-event" data-category="devsite-playlist: toggle button"> *keyboard_arrow_down* *keyboard_arrow_up* </button> Article

To apply CSS to an element you need to select it. CSS provides you with a number of different ways to do this, and you can explore them in this module.

[Read article](https://web.dev/learn/css/selectors.md.txt)

## Nesting

<button class="toggle gc-analytics-event" data-category="devsite-playlist: toggle button"> *keyboard_arrow_down* *keyboard_arrow_up* </button> Article

Nesting CSS style rules can make your stylesheets more organized, easier to read, and more maintainable.

[Read article](https://web.dev/learn/css/nesting.md.txt)

## The cascade

<button class="toggle gc-analytics-event" data-category="devsite-playlist: toggle button"> *keyboard_arrow_down* *keyboard_arrow_up* </button> Article

Sometimes two or more competing CSS rules could apply to an element. In this module find out how the browser chooses which to use, and how to control this selection.

[Read article](https://web.dev/learn/css/the-cascade.md.txt)

## Specificity

<button class="toggle gc-analytics-event" data-category="devsite-playlist: toggle button"> *keyboard_arrow_down* *keyboard_arrow_up* </button> Article

This module takes a deeper look at specificity, a key part of the cascade.

[Read article](https://web.dev/learn/css/specificity.md.txt)

## Inheritance

<button class="toggle gc-analytics-event" data-category="devsite-playlist: toggle button"> *keyboard_arrow_down* *keyboard_arrow_up* </button> Article

Some CSS properties inherit if you don't specify a value for them. Find out how this works, and how to use it to your advantage in this module.

[Read article](https://web.dev/learn/css/inheritance.md.txt)

## Color

<button class="toggle gc-analytics-event" data-category="devsite-playlist: toggle button"> *keyboard_arrow_down* *keyboard_arrow_up* </button> Article

There are several different ways to specify color in CSS. In this module we take a look at the most commonly used color values.

[Read article](https://web.dev/learn/css/color.md.txt)

## Sizing Units

<button class="toggle gc-analytics-event" data-category="devsite-playlist: toggle button"> *keyboard_arrow_down* *keyboard_arrow_up* </button> Article

In this module find out how to size elements using CSS, working with the flexible medium of the web.

[Read article](https://web.dev/learn/css/sizing.md.txt)

## Layout

<button class="toggle gc-analytics-event" data-category="devsite-playlist: toggle button"> *keyboard_arrow_down* *keyboard_arrow_up* </button> Article

An overview of the various layout methods you have to choose from when building a component or page layout.

[Read article](https://web.dev/learn/css/layout.md.txt)

## Flexbox

<button class="toggle gc-analytics-event" data-category="devsite-playlist: toggle button"> *keyboard_arrow_down* *keyboard_arrow_up* </button> Article

Flexbox is a layout mechanism designed for laying out groups of items in one dimension. Learn how to use it in this module.

[Read article](https://web.dev/learn/css/flexbox.md.txt)

## Grid

<button class="toggle gc-analytics-event" data-category="devsite-playlist: toggle button"> *keyboard_arrow_down* *keyboard_arrow_up* </button> Article

CSS Grid Layout provides a two dimensional layout system, controlling layout in rows and columns. In this module discover everything grid has to offer.

[Read article](https://web.dev/learn/css/grid.md.txt)

## Logical Properties

<button class="toggle gc-analytics-event" data-category="devsite-playlist: toggle button"> *keyboard_arrow_down* *keyboard_arrow_up* </button> Article

Logical, flow relative properties and values are linked to the flow of text, rather than the physical shape of the screen. Learn how to take advantage of this newer approach to CSS.

[Read article](https://web.dev/learn/css/logical-properties.md.txt)

## Custom Properties

<button class="toggle gc-analytics-event" data-category="devsite-playlist: toggle button"> *keyboard_arrow_down* *keyboard_arrow_up* </button> Article

Custom properties, or CSS variables, allow you to organize and reuse values in your CSS, so that your styles are more flexible and easier to understand.

[Read article](https://web.dev/learn/css/custom-properties.md.txt)

## Spacing

<button class="toggle gc-analytics-event" data-category="devsite-playlist: toggle button"> *keyboard_arrow_down* *keyboard_arrow_up* </button> Article

Find out how to select the best method of spacing elements, taking into consideration the layout method you are using and component that you need to build.

[Read article](https://web.dev/learn/css/spacing.md.txt)

## Pseudo-elements

<button class="toggle gc-analytics-event" data-category="devsite-playlist: toggle button"> *keyboard_arrow_down* *keyboard_arrow_up* </button> Article

A pseudo-element is like adding or targeting an extra element without having to add more HTML. They have a variety of roles and you can learn about them in this module.

[Read article](https://web.dev/learn/css/pseudo-elements.md.txt)

## Pseudo-classes

<button class="toggle gc-analytics-event" data-category="devsite-playlist: toggle button"> *keyboard_arrow_down* *keyboard_arrow_up* </button> Article

Pseudo-classes let you apply CSS based on state changes. This means that your design can react to user input such as an invalid email address.

[Read article](https://web.dev/learn/css/pseudo-classes.md.txt)

## Borders

<button class="toggle gc-analytics-event" data-category="devsite-playlist: toggle button"> *keyboard_arrow_down* *keyboard_arrow_up* </button> Article

A border provides a frame for your boxes. In this module find out how to change the size, style and color of borders using CSS.

[Read article](https://web.dev/learn/css/borders.md.txt)

## Shadows

<button class="toggle gc-analytics-event" data-category="devsite-playlist: toggle button"> *keyboard_arrow_down* *keyboard_arrow_up* </button> Article

There are a number of ways to add shadows to text and elements in CSS. In this module you'll learn how to use each option, and the tasks they were designed for.

[Read article](https://web.dev/learn/css/shadows.md.txt)

## Focus

<button class="toggle gc-analytics-event" data-category="devsite-playlist: toggle button"> *keyboard_arrow_down* *keyboard_arrow_up* </button> Article

Understand the importance of focus in your web applications. You'll find out how to manage focus, and how to make sure the path through your page works for people using a mouse, and those using the keyboard to navigate.

[Read article](https://web.dev/learn/css/focus.md.txt)

## Cursors and pointers

<button class="toggle gc-analytics-event" data-category="devsite-playlist: toggle button"> *keyboard_arrow_down* *keyboard_arrow_up* </button> Article

The cursor is an essential way for your users to know what they are interacting with. In this module, learn how you can style cursors in specific circumstances.

[Read article](https://web.dev/learn/css/cursors-and-pointers.md.txt)

## Z-index and stacking contexts

<button class="toggle gc-analytics-event" data-category="devsite-playlist: toggle button"> *keyboard_arrow_down* *keyboard_arrow_up* </button> Article

In this module find out how to control the order in which things layer on top of each other, by using z-index and the stacking context.

[Read article](https://web.dev/learn/css/z-index.md.txt)

## Anchor positioning

<button class="toggle gc-analytics-event" data-category="devsite-playlist: toggle button"> *keyboard_arrow_down* *keyboard_arrow_up* </button> Article

CSS anchor positioning provides a way to declaratively position an element relative to another element.

[Read article](https://web.dev/learn/css/anchor-positioning.md.txt)

## Popover and dialog

<button class="toggle gc-analytics-event" data-category="devsite-playlist: toggle button"> *keyboard_arrow_down* *keyboard_arrow_up* </button> Article

A popover is any element with a popover attribute, and is useful for a wide range of interactive patterns, including tooltips, alerts, toasts and more.

[Read article](https://web.dev/learn/css/popover-and-dialog.md.txt)

## Functions

<button class="toggle gc-analytics-event" data-category="devsite-playlist: toggle button"> *keyboard_arrow_down* *keyboard_arrow_up* </button> Article

CSS has a range of inbuilt functions. In this module you will find out about some of the key functions, and how to use them.

[Read article](https://web.dev/learn/css/functions.md.txt)

## Paths, shapes, clipping, and masking

<button class="toggle gc-analytics-event" data-category="devsite-playlist: toggle button"> *keyboard_arrow_down* *keyboard_arrow_up* </button> Article

Paths, shapes, clipping, and masking give developers the ability to render complex shapes in CSS through a variety of functions that can create memorable experiences for your users.

[Read article](https://web.dev/learn/css/paths-shapes-clipping-masking.md.txt)

## Gradients

<button class="toggle gc-analytics-event" data-category="devsite-playlist: toggle button"> *keyboard_arrow_down* *keyboard_arrow_up* </button> Article

In this module you will find out how to use the various types of gradients available in CSS. Gradients can be used to create a whole host of useful effects, without needing to create an image using a graphics application.

[Read article](https://web.dev/learn/css/gradients.md.txt)

## Animations

<button class="toggle gc-analytics-event" data-category="devsite-playlist: toggle button"> *keyboard_arrow_down* *keyboard_arrow_up* </button> Article

Animation is a great way to highlight interactive elements, and add interest and fun to your designs. In this module find out how to add and control animation effects with CSS.

[Read article](https://web.dev/learn/css/animations.md.txt)

## Filters

<button class="toggle gc-analytics-event" data-category="devsite-playlist: toggle button"> *keyboard_arrow_down* *keyboard_arrow_up* </button> Article

Filters in CSS mean that you can apply effects you might only think possible in a graphics application. In this module, you can discover what is available.

[Read article](https://web.dev/learn/css/filters.md.txt)

## Blend Modes

<button class="toggle gc-analytics-event" data-category="devsite-playlist: toggle button"> *keyboard_arrow_down* *keyboard_arrow_up* </button> Article

Create compositional effects by mixing two or more layers, and learn how to isolate an image with a white background in this module on blend modes.

[Read article](https://web.dev/learn/css/blend-modes.md.txt)

## Lists

<button class="toggle gc-analytics-event" data-category="devsite-playlist: toggle button"> *keyboard_arrow_down* *keyboard_arrow_up* </button> Article

A list, structurally, is composed of a list container element filled with list items. In this module, you'll learn how to style all the parts of a list.

[Read article](https://web.dev/learn/css/lists.md.txt)

## Counters

<button class="toggle gc-analytics-event" data-category="devsite-playlist: toggle button"> *keyboard_arrow_down* *keyboard_arrow_up* </button> Article

CSS provides several ways to control the counters in a list for different use cases. In this module, you'll learn how to control the counters in a list.

[Read article](https://web.dev/learn/css/counters.md.txt)

## Transitions

<button class="toggle gc-analytics-event" data-category="devsite-playlist: toggle button"> *keyboard_arrow_down* *keyboard_arrow_up* </button> Article

In this module, learn how to define transitions between states of an element. Use transitions to improve user experience by providing visual feedback to user interaction.

[Read article](https://web.dev/learn/css/transitions.md.txt)

## View Transitions for SPAs

<button class="toggle gc-analytics-event" data-category="devsite-playlist: toggle button"> *keyboard_arrow_down* *keyboard_arrow_up* </button> Article

View Transitions give you a way to show continuity or context between the pages in your SPA.

[Read article](https://web.dev/learn/css/view-transitions-spas.md.txt)

## Overflow

<button class="toggle gc-analytics-event" data-category="devsite-playlist: toggle button"> *keyboard_arrow_down* *keyboard_arrow_up* </button> Article

Overflow is how you deal with content that doesn't fit in a set parent size. In this module, you'll think outside the box, and learn how to style overflowing content.

[Read article](https://web.dev/learn/css/overflow.md.txt)

## Backgrounds

<button class="toggle gc-analytics-event" data-category="devsite-playlist: toggle button"> *keyboard_arrow_down* *keyboard_arrow_up* </button> Article

In this module learn the ways you can style backgrounds of boxes using CSS.

[Read article](https://web.dev/learn/css/backgrounds.md.txt)

## Text and typography

<button class="toggle gc-analytics-event" data-category="devsite-playlist: toggle button"> *keyboard_arrow_down* *keyboard_arrow_up* </button> Article

In this module, learn how to style text on the web.

[Read article](https://web.dev/learn/css/typography.md.txt)

## Container queries

<button class="toggle gc-analytics-event" data-category="devsite-playlist: toggle button"> *keyboard_arrow_down* *keyboard_arrow_up* </button> Article

Unlike media queries, container queries allow you to make more specific adjustments to elements based on the size and state of their ancestors, or containers.

[Read article](https://web.dev/learn/css/container-queries.md.txt)

## Conclusion and next steps

<button class="toggle gc-analytics-event" data-category="devsite-playlist: toggle button"> *keyboard_arrow_down* *keyboard_arrow_up* </button> Article

Further resources to help you take your next steps.

[Read article](https://web.dev/learn/css/conclusion.md.txt)

## CSS quiz

Take a quiz, earn a badge. Correctly answer CSS questions to earn your Learn CSS badge.
[Take the quiz](https://web.dev/learn/css/quiz)