Francis Ting
Francis Ting

Reputation: 791

Format HTML code in IntelliJ

When working with Java, Ctrl+Alt+L formats your highlighted code. Is there such a command when working with non-Java files like HTML? The same command doesn't work with HTML.

Upvotes: 4

Views: 14275

Answers (3)

Paulo Victor
Paulo Victor

Reputation: 4122

For Mac

Use Option+Command+L for Formatting HTML files.

You can check/customize it using: command+, for a search for Reformat Code.

Upvotes: 4

Dmytro Marchenko
Dmytro Marchenko

Reputation: 169

In Ultimate edition same keys (Ctrl+Alt+L) works for HTML as well. I suppose, community Edition doesn't support it out of the box.

Check settings: Settings -> Editor -> Code Style -> HTML (If it is not present, try to install some plugins for HTML support)

Upvotes: 10

Virender singh Rathore
Virender singh Rathore

Reputation: 303

Use Ctrl+Alt+S for Formatting HTML files.

Upvotes: 1

Related Questions