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

Rodrigo Novaes
Rodrigo Novaes
9,629 Points

Is there a reason for using Spaces 4?

I've been noticing that when you press "return" and then tab, your spaces were bigger than mine, so I had to figure out myself that your spaces were set to 4, which you never explained why...

Is there a good reason for using spaces 4?

2 Answers

Benjamin McKay
PLUS
Benjamin McKay
Courses Plus Student 3,767 Points

For HTML, the space before a line is just preference. There isn't a reason 4 spaces is better than anything else.

If you were ever working with a team there might be a set style guideline that you need to follow that would dictate a certain format for spaces.