Question · HTML and CSS course · Module 3: CSS Basics

Element Dimensions in Box Model

What happens to the total width of an element when you add padding: 20px to an element with width: 200px (default box-sizing)?

Answer options

  • The width stays at 200px
  • The width increases to 240px
  • The width decreases to 160px
  • Padding does not affect the width

You can check the correct answer by solving this task in the CodeWorlds game.