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

CSS CSS Foundations The Box Model The CSS Box Model Concept

Richard Lu
Richard Lu
20,185 Points

text-align: center vs margin: 0 auto

does the text-align: center property automatically make the paragraph element into a block model?

No It does not; however, most every element in the html dom has a default display block property.

1 Answer

Isaac Asante
Isaac Asante
4,752 Points

No, keep in mind that text-align does not add direct margins to an element. And the paragraph element is naturally a block-level element. See more on Mozilla Developer Network: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/p