Emmet Cheatsheet - Emmet Abbreviation & Syntax Reference
All essential Emmet commands organized by use case, with 39+ entries you can copy and run directly. Find the right command fast when you need it.
Back to Web ServicesHTML Basics 8
! 或 html:5Expand HTML5 document skeleton
div#app<div id="app"></div>
div.container<div class="container"></div>
ul>li*33 li elements under ul
ul>li.item$*3li with incrementing class: item1, item2, item3
p>span^divspan inside p, div sibling of p (climb-up)
a[href="#" title="link"]a tag with attributes
img<img src="" alt="">
Common HTML Structures 8
form:postform with method="post"
input:text<input type="text">
input:email<input type="email">
btn:submit<button type="submit"></button>
select>option*33 options under select
table>tr^tr>td*3Two-row table, 3 cells in second row
lorem10Generate 10-word placeholder text
lorem-cnGenerate Chinese placeholder (plugin required)
CSS Shorthand 18
w100width: 100px
w100pwidth: 100%
h50height: 50px
m10margin: 10px
m10-20margin: 10px 20px
p10-20-30padding: 10px 20px 30px
bgc#333background-color: #333
c#fffcolor: #fff
fz16font-size: 16px
fw700font-weight: 700
d:fdisplay: flex
d:gdisplay: grid
jc:cjustify-content: center
ai:calign-items: center
pos:aposition: absolute
t0 r0 b0 l0top/right/bottom/left: 0
bd1-s-#cccborder: 1px solid #ccc
br8border-radius: 8px
Nesting & Loops 5
div>ul>li*5>a{Item $}Nesting + loop + text interpolation
div+p+bqSibling nodes (+)
{Hello}Text node
${Item}Numbered text
(#header>ul>li*2>a)+footer>pGroup () combines multiple structures
💡 Tips
- VSCode 默认内置 Emmet,HTML/CSS/JSX/Pug 文件里直接 Tab 即可展开。
- $ 是递增占位符,$$ 补零(01, 02),$@- 倒序。
- CSS 简写用 - 连接多个值,如 m10-20 展开为 margin: 10px 20px。
Official References
Commands are compiled from the official docs below. Click to verify the latest usage.
Maintained by LaoHand
Publicly updated on Jul 21, 2026, continuously proofread against official docs.
Found an error? Report it
Wrong command or description? Open an issue to help us fix it.
Found an error? Report it