Keyboard: CTRL + K, CTRL + D (document); CTRL + K, CTRL + F (selection)
Menu: Edit -> Advanced -> Format Document; Edit -> Advanced -> Format Selection
Command: Edit.FormatDocument; Edit.FormatSelection
In vstipEdit0057 (http://blogs.msdn.com/b/zainnab/archive/2010/05/19/format-the-current-document-or-selection-vstipedit0057.aspx) I showed you how to format code. I thought it would be a good idea to look at the same thing from a web project perspective. Let's say you have some HTML you just wrote:
But you want to clean it up a bit. Just select everything you want formatted, then RIGHT CLICK, and choose "Format Selection" (CTRL + K, CTRL + F):
Here is the result:
This uses the formatting rules found at Tools -> Options -> Text Editor -> HTML -> Formatting to determine what to do.