Visual Studio Code: Format Selection not working in PHP files with HTML

Viewed 154

I have VS Code version 1.63.2 with a problem.

I want to format some selection of HTML in PHP file. But the whole document is formatted as if I clicked on Format Document. How to solve this problem?

Step 1

Step 2

1 Answers

Install Format HTML in PHP extension in VS Code. Select the HTML codes you want to format in the *.php file and click the Format HTML in PHP option ( CTRL ALT F) in the right-click menu.

Related