HTML format when hit the Shortcut

Answered

Hello everyone,

I am quite new to HTML formatter in Intellij IDEA 2022.2.3

I hit the formating shortcut in an html file like below

<body>
<p1>This is the first line</p1>
Hello world;
</body>

and it turned out to be 

<body>
<p1>This is the first line</p1>
Hello world;


</body>

The problem is that I want any lines inside the body tag formatting to be indent 4 spaces from the beginning. Does anyone know how to do it?

 

Thank you in advance.

2 comments
Comment actions Permalink

Settings (Preferences on macOS) | Editor | Code Style | HTML | Other | Do not indent children of, remove body and other tags you want indentation inside of.

1
Comment actions Permalink

Thank you. You are a life saver

0

Please sign in to leave a comment.