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 Introduction to HTML and CSS (2016) Make It Beautiful With CSS Review: Make It Beautiful with CSS

Misleading Question

Introduction to HTML and CSS course. Quiz question: Margin and padding are used to increase and decrease the space around and element. The video states that the Margin property is used to increase and decrease the space INSIDE the element where as the padding property alone is used to increase and decrease the space AROUND the element. I found this question to be a bit misleading.

2 Answers

Steven Parker
Steven Parker
231,236 Points

:x: You have that backwards. The margin property is used to increase and decrease the space around an element (outside the borders, if any), and the padding property is used to increase and decrease the space inside the element borders.

If they actually say it the other way in a video, it should be reported as a bug :beetle: (can you give a link to the video?).

As to the quiz, from the visual perspective, both margin and padding increase space, so I can see reasoning for "yes" being the answer. And both do affect the space around the content area. But I can also see your point about it being confusing to lump them together and use the word "around". You might want to report this as a bug to Treehouse Support.

The Video is Found here: https://teamtreehouse.com/library/introduction-to-html-and-css/make-it-beautiful-with-css/select-and-style-multiple-elements-by-class

Thank You for your answer and approaching with an open mind. You are absolutely right I did type that up backwards. Margin = around - padding = inside. I can see their perspective as well but only if you didn't have a border around your element. I am not sure the effect of a wrong answer in a quiz. If you were striving for points I suppose it would be annoying. The video does give you the correct description just the question is vauge.

Steven Parker
Steven Parker
231,236 Points

Your point about the quiz question is valid. If you haven't already done so, I encourage you to write to Treehouse Support, and explain how you found the word "around" confusing when applied to both margin and padding.