Languages
[Edit]
EN

VS Code - format html code

11 points
Created by:
Aaron1
568

In this short article, we would like to show how to format HTML code in VS Code.

Simple steps:

  1. open HTML file,
     
  2. use one keys combination from the below table,
    Depending on the operating system:
     Keys Combination Operating System
    Shift+Alt+Fon Windows
    Shift+Option+Fon Mac
    Ctrl+Shift+ion Ubuntu
  3. if you don't have selected the default formatter you need to select one from the displayed list or install a new one, e.g:

 

Practical example:

VS Code used to format HTML source code (installed Prettier formatter).
VS Code used to format HTML source code (installed Prettier formatter).

 

Alternative titles

  1. VS Code - beautify html code
  2. VS Code - make html code pretty
  3. VSCode - format html code
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

Visual Studio Code

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join