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 trialHae Choi
Courses Plus Student 1,506 PointsIs the space after the colon in "background-color: orange" recommended for best practice? It still works without space.
For inline styling.
2 Answers
Jason Anders
Treehouse Moderator 145,860 PointsHi Hae,
For the most part, whitespace in CSS / HTML does not matter. So, yes, either will work just fine. As Thomas Hooper stated, it is mostly for readability, but it is also the more common practice.
:)
Mod Note: Moved Thomas' response from Comments to Answers
Thomas Hooper
15,557 PointsI'd say it is for readability reasons.