How to format html files in Eclipse?

后端 未结 5 1390
终归单人心
终归单人心 2021-01-31 02:01

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

5条回答
  •  [愿得一人]
    2021-01-31 02:23

    go to 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.

提交回复
热议问题