format html in visual studio code code example

Example 1: format code in vs code

On Windows Shift + Alt + F.
On Mac Shift + Option + F.

Example 2: visual studio code html template shortcut

First set HTML to the language
Then type:

html:5

And hit Tab

Voila, HTML Template in your favorite code editor!

Example 3: format in visual studio code

Ctrl+K Ctrl+F

Example 4: vs code enable "html" in "javascript"

"emmet.includeLanguages": {
    "javascript": "javascriptreact",
    "vue-html": "html",
    "razor": "html",
    "plaintext": "pug"
}