autoindent html in VSCode

Open your settings.json file following these steps:

{
  // a bunch of other configs...
  "editor.formatOnPaste": true,
  "editor.formatOnSave": true,
  "[html]": {
    "editor.defaultFormatter": "vscode.html-language-features"
  }
}

references