Skip to content

Instantly share code, notes, and snippets.

@darnocer
Last active August 13, 2022 15:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save darnocer/c52eda8e70af84d0de52b271c8e8cc98 to your computer and use it in GitHub Desktop.
Save darnocer/c52eda8e70af84d0de52b271c8e8cc98 to your computer and use it in GitHub Desktop.
How to Use Emmet in VSCode

How to Use Emmet

Emmet comes with VSCode and autocompletes HTML.

(For the following examples, --> represents pressing the tab key.)

You can specify a .class or #id, which will expand into a <div> by default:

.class-name --> <div class="class-name"></div>

#id-name --> <div id="id-name"></div> 

For any tag other than div, type the element first, then the class or id:

main.class-name --> <main class="class-name"></main>

section#id-name --> <section id="id-name"></section>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment