Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

HTML Introduction to HTML and CSS 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
220,937 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
220,937 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.