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

General Discussion

Intentation

Hi,

Please some one let me know what is the best practice to intend the html doc. How to do that in sequential manner ?

Regards

jag
jag
18,266 Points

Do you mean indentation?

3 Answers

Steven Parker
Steven Parker
231,127 Points

Indent to show nesting level.

The common practice is to indent HTML to indicate the nestling level of each element, usually 2 spaces for each level of depth. Here's a short example:

<body>
  <h1>Here's a header</h1>
  <div>
    <p>Here's a paragraph</p>
    <p>
      Here's another one, but with tags and text on separate lines.
    </p>
  </div>
</body>

I'm not sure what you mean by "sequential manner".

Sequence

Steven Parker
Steven Parker
231,127 Points

Try rephrasing a complete question elaborating on what you want to know regarding "sequence".

You may also want to change the category of this question to "HTML".

@ jag Yes Indentation