Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialvamosrope14
14,932 PointsSo do some block elements come predefined with certain margins and paddings already applied to them?
.
2 Answers
Steven Parker
231,236 PointsYou asked a very similar question two days ago. And I said:
Some elements have padding or margins by default, but most do not.
Here's a CSS Default Values Reference on w3schools.com that shows the values different elements have by default.
vamosrope14
14,932 Points.
vamosrope14
14,932 Pointsvamosrope14
14,932 Points.
Steven Parker
231,236 PointsSteven Parker
231,236 PointsThere's no default padding. The white space is the margin between the body and the html element. Elements that cover 100% of the body still don't reach the edges of the window because of that margin.
Note that there would be no visible difference between margin on the body element (the default) and padding applied to the html element (not normally done).