Pablo Fernandez
Pablo Fernandez

Reputation: 287390

Change Visual Studio 2008 HTML indentation style

Visual Studio 2008 insists on indenting HTML like this:

<h1>
    title</h1>
<h2>
    subtitle</h2>

where for me, this is much nicer:

<h1>title</h1>
<h2>subtitle</h2>

Is there any way to tell Visual Studio 2008 to use the later indentation style when doing auto-formating?

Upvotes: 4

Views: 923

Answers (1)

Sasha Chedygov
Sasha Chedygov

Reputation: 130787

In Options, under HTML, go to "Format" and click "Tag Specific Options". Then find the tags you want to change (h1, h2, etc.) and uncheck indent contents. (Source)

The guide linked above is for Visual Studio 2005, so it may be slightly different for 2008, but I'm sure you'll find it.

Upvotes: 5

Related Questions