eusataf
eusataf

Reputation: 897

How to structure html code using VS code?

There is an HTML document in which there are no indents.

How to structure html code using VS code?
Using extensions or not using extensions.

The initial state of the HTML document.
enter image description here

The required state of the HTML document.
enter image description here

Upvotes: 2

Views: 6851

Answers (3)

HeartKush
HeartKush

Reputation: 3

You can press alt + shift + T or install Beautify extension, then press F1 and search beautfy, finally get your code indented.

Upvotes: 0

MagnusEffect
MagnusEffect

Reputation: 3905

Install Prettier extension and just Ctrl+Shift+I to structure/decorate the code

Upvotes: 0

Winter
Winter

Reputation: 326

Right click in the file and select 'Format Document'. In Mac, the shortcut is 'Option + Shift + F'. VS Code has built in HTML CSS formatting.

Upvotes: 2

Related Questions