Get Mystery Box with random crypto!

Padding and Margin These two terms are pretty confusing in CSS | Programming Diaries

Padding and Margin
These two terms are pretty confusing in CSS. But the difference is easy to observe. Margin is basically the space around an element. While padding refers to the space between the element and the content inside it. To observe the difference create a simple button in HTML. and give it a class of btn



And in the style
.btn{
margin: 10px;
}
Reload and observe the difference.

.btn{
padding:10px;
}

you can clearly see the difference on that.