Class 10
Computer Science
Ch 3: Cascading Style Sheets (CSS3) & Styling
CSS Box Model & Styling Selectors
The CSS Box Model Explained
Every HTML element on a web page is rendered as a rectangular box comprising four concentric layers:
- Content: The innermost area where text and images appear.
- Padding: Transparent area clearing space immediately around the content (inside the border).
- Border: A visible boundary enclosing the padding and content.
- Margin: Transparent space outside the border that separates this element from adjacent elements.
Practice Questions (1)
View All Chapter Q&AFill in the Blanks (1)
Q1
In the CSS Box Model, the transparent space immediately between the content and the border is known as _________.
Answer:
Padding
Padding clears an area around the content within the border of an element.