Recall & Review
beginner
What is padding in CSS?
Padding is the space between the content of an element and its border. It creates inner space inside the element.
Click to reveal answer
beginner
How do you set padding on all four sides of an element?
Use the
padding property with one value, like padding: 1rem;. This adds equal padding on top, right, bottom, and left.Click to reveal answer
beginner
What is the difference between
padding and margin?Padding adds space inside the element, between content and border. Margin adds space outside the element, between the element and other elements.
Click to reveal answer
intermediate
How can you set different padding values for top, right, bottom, and left?
Use four values in
padding: padding: top right bottom left;. For example, padding: 1rem 2rem 1rem 2rem;.Click to reveal answer
intermediate
Why is padding important for accessibility and design?
Padding improves readability by adding space around content. It also helps clickable areas be larger and easier to use, improving accessibility.
Click to reveal answer
What does the CSS
padding property control?✗ Incorrect
Padding controls the space inside the element, between its content and border.
Which CSS rule sets equal padding on all sides of an element?
✗ Incorrect
Using one value like
padding: 10px; sets equal padding on all four sides.How do you specify padding for top, right, bottom, and left in one line?
✗ Incorrect
The order is top, right, bottom, left when using four values for padding.
What happens if you set
padding: 0; on an element?✗ Incorrect
Padding of zero means no space inside the element between content and border.
Why should clickable buttons have padding?
✗ Incorrect
Padding increases the clickable area, making buttons easier to use, especially on touch devices.
Explain what padding is and how it affects the layout of a webpage.
Think about the space between text and the edge of a box.
You got /4 concepts.
Describe how to set different padding values for each side of an element using CSS.
Remember the order of sides when using four values.
You got /3 concepts.