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

What ia padding in HTML?

Can any one explain what is padding in HTML codes.. I've seen this in almost every single HTML file. I tried to Google it but I could not understand the words. they were a bit hard. My English is also poor so their explanation was hard for me to understand.

22nd Nov 2017, 8:37 AM
Hamza Humair
Hamza Humair - avatar
5 Answers
+ 3
suppose you have a piece of paper and you draw a rectangle on it, which will act as a border for the text you write into it. now: when you begin to write your text, you usually don't start writing with the letters touching that border. instead you leave some space between your border and text (or whatever it is you put inside your borders). so, this space between your content and your border is called "padding". note: similarly, you can leave some space outside of the borders. that's called margin.
22nd Nov 2017, 10:38 AM
storm
storm - avatar
+ 8
Padding is a space between content and border of element
22nd Nov 2017, 8:44 AM
ThreeG
ThreeG - avatar
+ 6
https://code.sololearn.com/WMdLWbm31Rro/?ref=app Here you can see some basic examples
22nd Nov 2017, 10:33 AM
ThreeG
ThreeG - avatar
0
Can you please explain it with an example? it would be really helpful. thanks in advance for the help 😊
22nd Nov 2017, 8:45 AM
Hamza Humair
Hamza Humair - avatar
0
Thanks everyone it really helped me. Thanks ThreeG for the example :)
22nd Nov 2017, 3:59 PM
Hamza Humair
Hamza Humair - avatar