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 trial

HTML How to Make a Website Adding Pages to a Website Add a New Page

505 Points


Sir iam not at all understanding the difference between margin and padding.Iam very much confusing in margin and padding??

2 Answers

Margin is the space outside of an elements box model, padding is the space inside of the elements box model.

Greg Kaleka
Greg Kaleka
39,021 Points

Hey Luke,

Hope you don't mind - I edited your answer to display the image in-line. Take a look at the markdown for future reference. You can put an alt description in the square brackets if you like.

Thanks Greg, I totally forgot about being able to do that. :)

https://developer.mozilla.org/en-US/docs/Web/CSS/padding https://developer.mozilla.org/en-US/docs/Web/CSS/margin Here is a couple other links for you man from Mozilla MDN Docs (Mozilla Development Network). It is a great website for all your web development needs, I hope it helps.