My favorite way to wrap text in an HTML tag in VS Code: Use Emmet


My favorite way to wrap text in an HTML tag in VS Code: Use Emmet.

1. Open the command palette (Cmd+Shift+P)

2. Execute "Emmet: Wrap with Abbreviation" (The default if you ran it recently)

3. Enter the tag name and hit enter. 😎
The animated gif shows entering a more complex Emmet shortcut that also applies a CSS class. But you can simply enter the plain HTML tag, which is what I normally do.

View original on X