This site is mobile accessible. Press the "Tap Here" button to use a smaller font-size.

Smartphone icons created by Freepik - Flaticon

CSS Fundamentals

Welcome To CSS

CSS 3

This is the w3schools CSS Fundamentals course. CSS is the language we use to style an HTML document. CSS describes how HTML elements should be displayed.

Student tip

You can use W3schools Spaces, to learn, test, and deploy code. Build your own website. Get started at www.w3schools.com/spaces

Module 1: Introduction to Cascading Style Sheets

Learn the basics of Cascading Style Sheets.

Module 2: Colors, Backgrounds and Borders

This module defines what colors are used in the webpage, i.e. font, background and border colors. It also defines the background of the webpage and the borders of each HTML element.

Prerequisites: Module 1: Introduction

Module 3: Margins, Padding, Size, Box Model and Outline

This module defines the margins, padding, size (height/width), box mode and outline of elements on web pages.

Prerequisites: Module 2: Colors, Backgrounds and Borders

Module 4: Text, Font and Icons

This module describes how to format text, add font families and font effects. It also describes how to add Google remote fonts and Google remote font effects and remote icons from other providers to your project.

Prerequisites: Module 3: Margins, Padding, Size, Box Model and Outline

Module 5: Links, Lists and Tables

This module describes the options for styling links, lists and tables including how to make tables responsive.

Prerequisites: Module 4: Text, Font and Icons

Module 6: Visibility and Layout

This module describes the different options available for display, max-width as well as positioning different elements including float and align the elements. It also describes how inline and block elements are displayed.

Prerequisites: Module 5: Links, Lists and Tables

Module 7: Combinators, Pseudo-Classes and Pseudo-Elements

Prerequisites: Module 6: Visibility and Layout

This module discusses Combinators, Pseudo-Classes and Pseudo-Elements and how to use them. They may also be combined to create advanced features.

Module 8: Opacity and Attribute Selectors

Prerequisites: Module 7: Combinators, Pseudo-Classes and Pseudo-Elements

Module 9: Forms and Counters

Prerequisites: Module 8: Opacity and Attribute Selectors

Module 10: Units, Specificity, Rounded Corners and Border Images

Prerequisites: Module 9: Forms and Counters

Module 11. More on Background and Colors

Prerequisites: Module 10. Units, Specificity, Rounded Corners and Border Images

Module 12. Shadow and Text Effects

Prerequisites: Module 11. More on Background and Colors

Module 13. Transforms, Transitions and Animations

Prerequisites: Module 12. Shadow and Text Effects

Module 14. Object Fit, Columns, User Interface and Variables

Prerequisites: Module 13. Transforms, Transitions and Animations

Module 15: Box Sizing, Media Queries and Flexbox

Prerequisites: Module 14. Object Fit, Columns, User Interface and Variables

Module 16: CSS Grid

Prerequisites: Module 15. Box Sizing, Media Queries and Flexbox