The XML formatting works perfect but not the html formatting. In fact if I use \"cmd-shift-F\" for a html file, it just left aligns almost everything. I\'ve attached the before
go to Window --> preferences --> Web --> HTML files --> Editor.
Window --> preferences --> Web --> HTML files --> Editor
In the Inline Elements section, select all the elements that you don't want eclipse to inline(continue with same line).
Click Apply and then Ok. Now re format using ctrl + shift + f.
ctrl + shift + f