Box Model CSS

Let’s see the Box Model implementation in HTML and CSS.

Box Model

.box {
    background-color: pink;
    width: 400px;
    border: 30px solid red;
    padding: 30px;
    margin: 30px;
}

Try it

Width and Height of an Element

img
{
    border: 10px solid purple;
     width: 300px;
     height: 100px;
}

Try it

Prof.Fazal Rehman Shamil (Available for Professional Discussions)
1. Message on Facebook page for discussions,
2. Video lectures on Youtube
3. Email is only for Advertisement/business enquiries.