David Jay
David Jay

Reputation: 353

How can format HTML with Visual Studio Code?

I found a file that I want to read with an unorder HTML code,

There is any visual studio code extension that can fix it to order code?

The code is something like and I want it to look prettier that each tag breaks the line.

div><div class="menu"><div class="grid grid-flow-col self-center mx-auto"><div class="cursor-pointer font-bold mx-4"><a href="#ava"><p>text</p></a></div><div class="cursor-pointer font-bold mx-4"><a href="#jarvis"><p>home</p></a></div><div class="cursor-pointer font-bold mx-4"><a href="#faq"><p>FAQ</p></a></div><div 

Upvotes: 0

Views: 87

Answers (1)

C. Coetser
C. Coetser

Reputation: 26

You should be able to format, or "beautify" the code in the Visual Studio Code editor using the following:

Windows: Shift + Alt + F Linux: Alt + Shift + I macOS: + + F

Alternatively Right click somewhere in the content area (text) for the file Select "Format Document" from the menu.

Upvotes: 1

Related Questions