What is EmmetVS?

EmmetVS is a powerful extension for Visual Studio 2022 that helps developers write HTML and CSS code faster using abbreviated syntax that expands into full code snippets.

Installation

Basic Usage

Type an Emmet abbreviation and press Tab to expand it into full HTML/CSS code.

Common Abbreviations

! → Basic HTML template
div → <div></div>
p → <p></p>
ul>li → <ul><li></li></ul>
div.classname → <div class="classname"></div>
div#idname → <div id="idname"></div>

Practical Examples

Here are some common use cases:

1. Creating a Navigation Menu

nav>ul>li*5>a

<!-- Expands to -->
<nav>
    <ul>
        <li><a href=""></a></li>
        <li><a href=""></a></li>
        <li><a href=""></a></li>
        <li><a href=""></a></li>
        <li><a href=""></a></li>
    </ul>
</nav>

2. Creating a Simple Form

form>input:text+input:email+input:submit

<!-- Expands to -->
<form>
    <input type="text">
    <input type="email">
    <input type="submit">
</form>

Pro Tips