Coding task · HTML and CSS course · Module 3: CSS Basics
Box Model: Padding and Border
The CSS Box Model is like an Egyptian sarcophagus! From the center: CONTENT (the mummy), PADDING (cushioning), BORDER (golden walls), MARGIN (space between sarcophagi). Every HTML element is a box!
Task
Create an Egyptian sarcophagus using a <div> with class .sarcophagus. In CSS, add: padding: 30px, border: 5px solid #FFD700, margin: 20px, background-color: #8B4513, color: white, width: 300px. Observe how each layer creates a box!