This template demonstrates the most commonly used CSS box model properties with examples. Each section covers a key property, its possible values, and a visual example.
widthSets the width of an element's content area, e.g., 200px, 50%, auto.
heightSets the height of an element's content area, e.g., 100px, 50vh, auto.
marginSets the outer spacing around an element, e.g., 20px, 10px 20px, auto.
paddingSets the inner spacing within an element, e.g., 15px, 10px 20px.
borderSets the border around an element, e.g., 1px solid black, 2px dashed red.
border-widthSets the thickness of the border, e.g., 1px, medium, 2px 4px.
border-styleSets the style of the border, e.g., solid, dashed, dotted.
border-colorSets the color of the border, e.g., red, #000, rgb(0, 255, 0).
border-radiusRounds the corners of an element, e.g., 5px, 10px 20px, 50%.
box-sizingDefines how width and height are calculated, e.g., content-box, border-box.