Box Model

The box model consists of properties that tell us how much space an element should occupy on a web page.

  • Content - The actual content of the element. (For a p element, it's the text; for an img element, it's the image.)
  • Padding - The space between the content and the border.
  • Border - The border around the content and padding. (It can be invisible.)
  • Margin - The space between the border and the element's surroundings.

Instructions

Select all elements (selector *) with the following declaration:
border: 1px solid red;

Now you should see borders around all elements.

Start programming for free

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

Or sign up with:

2/9

Box Model | Start Coder