CSS Box Model

CSS box model is like a container.it is used to multiple properties like padding,margin,content,like that.

it is used to create the layout of the web pages.

css box model


<!DOCTYPE html>
        div {
        width: 500px;
        height: 300px;
        padding: 15px;
        border: 10px solid black;
        margin: 20px auto;
        border-color: red;

Click on the "Run This Code" button to see how it works.


Welcome CSS Syntax CSS Selectors CSS ADD css CSS Borders CSS Backgrounds CSS Colors CSS Padding CSS Margin CSS Fonts CSS Text CSS Outline CSS Box-Model CSS Height&Width CSS Icons CSS Links CSS Lists CSS Display CSS Tables CSS Position CSS Overflow CSS Align CSS Float CSS Inline-block CSS Opacity CSS Image-Gallery CSS Navigation Bar CSS Dropdowns CSS Cursors CSS Forms CSS Pseudo-classes CSS Pseudo-elements


CSS Gradients CSS shadows CSS 2D Transforms CSS 3D Transforms CSS Animations CSS Media Queries CSS Flexbox CSS important CSS Units