Is it necessay to use padding in <div> tag in html if yes then why? What does it do? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Is it necessay to use padding in <div> tag in html if yes then why? What does it do?

31st Dec 2016, 11:44 AM
Micro Pixels
Micro Pixels - avatar
2 Answers
+ 2
Nothing about styling (css) is fundamental to the markup (html), it's probably just an aesthetic preference.
31st Dec 2016, 11:52 AM
Dao
Dao - avatar
+ 1
padding and margin offer some spaces between whether texts or your nav bar in the browser from the body ..........
31st Dec 2016, 12:14 PM
Abdel
Abdel - avatar