The role of padding
The padding provides a buffer between the content and the border. Although it cannot have its own colour, everything inside the border, including the padding, will obtain the colour of the background-color
property of the content. In our example we assign a size value to the padding property (padding
).
Image: (right) Ivor Traber
Note:
Hints:
- undefined
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
<!DOCTYPE html>
<html lang="en">
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
p {
background-color: yellow;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX