{
"id": "box-model",
"title": "CSS Box Model Essentials",
"description": "Understand how CSS calculates sizes and spacing around elements using margin, border, padding, and content areas.",
"difficulty": "beginner",
"lessons": [
{
"id": "box-model-1",
"title": "Content, Padding, Border, Margin",
"description": "Learn the four layers of the CSS box model and how each affects element dimensions.",
"task": "Create a div with class 'box' and add 1.25rem padding, a 0.125rem solid #333 border, and 1rem margin.",
"previewHTML": "
box-sizing changes the box model calculation for width and height.",
"task": "Set box-sizing: border-box; on the .box element and note how its width includes padding and border.",
"previewHTML": "divs with class 'box' and 1rem top margin on each. Observe margin collapse.",
"previewHTML": "