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 Select and Style Multiple Elements by Class

Why isn't the head tag indented after the HTML tag?

.

2 Answers

That's because you treat these tags as equal.

For example, in the body, if you have two unordered lists, your HTML will be something like this.

<ul>
  <li>List Item #1</li>
  <li>List Item #2</li>
</ul>

<ul>
  <li>List Item #3</li>
  <li>List Item #4</li>
</ul>

You don't want to indent your second unordered list because you know these tags or lists are treated as equal, so it's easier for you to read. If you indent it, you will believe for a second, that this UL is inside the other one, and that's not truth :P

Michal Svačina
Michal Svačina
5,089 Points

Actually they should be from the concept of things, but a lot of people don't do it because it is a little bit unnecessary. You do not really have to do the indentation at all, even though it would be really hard to read the code it will still work.