Intro to CSS

Lesson 1: Background Color

Theory

The background-color property sets the background color of an element.

Syntax: background-color: value;

Example Code

.box {
    background-color: #ef4444;
    padding: 20px;
    border-radius: 8px;
    color: white;
}
This box has a red background!

Try It Yourself

style.css
Live Preview

Lesson 2: Text Color

Theory

The color property sets the color of text foreground.

style.css
Live Preview

Lesson 3: Box Model

style.css
Live Preview

Lesson 4: Typography

style.css
Live Preview

Lesson 5: Alignment & Decoration

style.css
Live Preview

Lesson 6: Pseudo Classes

style.css
Live Preview

Lesson 7: Tooltips

style.css
Live Preview

Lesson 8: CSS Animations

style.css
Live Preview