Introduction to CSS Box Model

In the third CSS lesson, we will look at the CSS box model.

Every element on a web page is interpreted as content within a box. You may have noticed that when you set a background color, it doesn't just color the area behind the text, but the entire line. Why?

That's because the background color is applied to the box, not the content. And the text in HTML has a box that spans the entire line by default.

In this lesson, we will explore what the CSS box model allows us to do and how to utilize it.

Instructions

When you're ready, move on to the next exercise!

Start programming for free

By signing up, you agree to the Terms of Service and Privacy Policy.

Or sign up with:

1/9

Introduction to CSS Box Model | Start Coder