how to do formatting in vs code – VS Code HTML Formatting
🧹 Open HTML Formatter Tool
Use how to do formatting in vs code instantly – beautify, minify, or validate your HTML code.
VS Code has built‑in HTML formatters, but extensions give more control. Here's how to set them up.
Recommended extensions
- Prettier – opinionated, supports HTML/CSS/JS
- Beautify – customisable indentation
- HTML CSS Support – auto‑completion + formatting
Setup Prettier for HTML
// settings.json
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"prettier.printWidth": 100
}