What is padding? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What is padding?

I am learning block elements and I wanna know what padding is.

28th Jan 2018, 3:48 PM
Mauro Sousa
Mauro Sousa - avatar
3 Answers
28th Jan 2018, 5:24 PM
Igor Makarsky
Igor Makarsky - avatar
0
create a empty div tag and enter few words in it. assign width and height and give padding and margin to the div tag. (background-color for better visibility). once you done this inspect it with any browser by right clicking on it, for example in Firefox there is a css window where u can see boxes for margin and padding change the values u will understand quickly..hope this will helps you
28th Jan 2018, 5:06 PM
Darshan K M
Darshan K M - avatar
0
Padding is the distance between your element (text from a paragraph for example) and the border of that element. Is you don't set a border that padding will be space defined by you, between your element and other elements.
30th Jan 2018, 7:50 PM
Jose Alfredo Cardenas Perez
Jose Alfredo Cardenas Perez - avatar