This is a quick tutorial on how to setup VSCode to format on save using the Prettier extension, including formatting HTML.
Install the Prettier Extension

Select ‘Settings’ from the gear icon in the lower left corner of VSCode

In the search bar type ‘forma’ to look for format and choose Prettier as your default formatter and turn on format on save

Select ‘Command Palette’ from the gear icon in the lower right hand corner of VSCode

In the search bar type ‘settings’ and select the ‘Preferences: Open Settings (JSON)

Add the new line to the JSON.
This part is probably the hardest part. VSCode will help you though by trying to auto complete the right line of code. Be sure to add a comma at the end of the line before this new line.


