Cheat Sheet
Cheat Sheet
Emmet Documentation
Syntax
Child: > Item numbering: $
nav>ul>li ul>li.item$*5
<nav> <ul>
<ul> <li class="item1"></li>
<li></li> <li class="item2"></li>
</ul> <li class="item3"></li>
</nav> <li class="item4"></li>
<li class="item5"></li>
</ul>
Sibling: +
div+p+bq h$[title=item$]{Header $}*3
<div></div> <h1 title="item1">Header 1</h1>
<p></p> <h2 title="item2">Header 2</h2>
<blockquote></blockquote> <h3 title="item3">Header 3</h3>
ul>li.item$$$*5
Climb-up: ^
<ul>
div+div>p>span+em^bq <li class="item001"></li>
<div></div> <li class="item002"></li>
<div> <li class="item003"></li>
<p><span></span><em></em></p> <li class="item004"></li>
<blockquote></blockquote> <li class="item005"></li>
</div> </ul>
div+div>p>span+em^^bq ul>li.item$@-*5
<div></div> <ul>
<div> <li class="item5"></li>
<p><span></span><em></em></p> <li class="item4"></li>
</div> <li class="item3"></li>
<blockquote></blockquote> <li class="item2"></li>
<li class="item1"></li>
</ul>
Grouping: ()
div>(header>ul>li*2>a)+footer>p ul>li.item$@3*5
<div> <ul>
<header> <li class="item3"></li>
<ul> <li class="item4"></li>
<li><a href=""></a></li> <li class="item5"></li>
<li><a href=""></a></li> <li class="item6"></li>
</ul> <li class="item7"></li>
</header> </ul>
<footer>
<p></p>
</footer> ID and CLASS attributes
</div> #header
<div id="header"></div>
(div>dl>(dt+dd)*3)+footer>p
<div> .title
<dl>
<div class="title"></div>
<dt></dt>
<dd></dd>
<dt></dt> form#search.wide
<dd></dd> <form id="search" class="wide"></form>
<dt></dt>
<dd></dd> p.class1.class2.class3
</dl> <p class="class1 class2 class3"></p>
</div>
<footer>
<p></p> Custom attributes
</footer>
p[title="Hello world"]
<p title="Hello world"></p>
Multiplication: *
td[rowspan=2 colspan=3 title]
ul>li*5
<td rowspan="2" colspan="3" title=""></td>
<ul>
<li></li>
<li></li> [a='value1' b="value2"]
<li></li> <div a="value1" b="value2"></div>
<li></li>
<li></li>
</ul>
Text: {}
a{Click me}
<a href="">Click me</a>
em>.class
<em><span class="class"></span></em>
ul>.class
<ul>
<li class="class"></li>
</ul>
table>.row>.col
<table>
<tr class="row">
<td class="col"></td>
</tr>
</table>
HTML
All unknown abbreviations will be transformed to tag, e.g. foo <foo></foo>.
! pic
Alias of html:5 Alias of picture
a
<a href=" "> </a> obj
Alias of object
a:link <object data=" " type=" "> </object>
<a href="http:// "> </a>
cap
a:mail
Alias of caption
<a href="mailto: "> </a>
<caption> </caption>
abbr
colg
<abbr title=" "> </abbr>
Alias of colgroup
basefont
btn
<basefont />
Alias of button
<button> </button>
br
<br />
optg
hr tarea
<hr />
Alias of textarea
leg
bdo:r
Alias of legend
<bdo dir="rtl"> </bdo>
<legend> </legend>
bdo:l
art
link
Alias of article
<link rel="stylesheet" href=" " />
<article> </article>
link:css
hdr
<link rel="stylesheet" href=" style .css" />
Alias of header
link:rss dlg
<link rel="alternate" type="application/rss+xml" Alias of dialog
title="RSS" href=" rss.xml " />
<dialog> </dialog>
link:atom
str
<link rel="alternate" type="application/atom+xml"
title="Atom" href=" atom.xml " /> Alias of strong
<strong> </strong>
link:import, link:im
<link rel="import" href=" component .html" /> prog
Alias of progress
meta <progress> </progress>
<meta />
mn
meta:utf
Alias of main
<meta http-equiv="Content-Type"
content="text/html;charset=UTF-8" /> <main> </main>
meta:win tem
<meta http-equiv="Content-Type" Alias of template
content="text/html;charset=windows-1251" />
<template> </template>
meta:vp
datag
<meta name="viewport" content="width= device-width ,
Alias of datagrid
user-scalable= no , initial-scale= 1.0 , maximum-
scale= 1.0 , minimum-scale= 1.0 " /> <datagrid> </datagrid>
meta:compat datal
<meta http-equiv="X-UA-Compatible" content=" IE=7 " Alias of datalist
/>
<datalist> </datalist>
style
kg
<style> </style>
Alias of keygen
<keygen />
script
<script> </script>
out
Alias of output
script:src
<script src=" "> </script> <output> </output>
img det
<img src=" " alt=" " /> Alias of details
<details> </details>
img:srcset, img:s
<img srcset=" " src=" " alt=" " />
cmd
Alias of command
img:sizes, img:z
<command />
<img sizes=" " srcset=" " src=" " alt=" " />
doc
picture
Alias of html>
<picture> </picture>
(head>meta[charset=${charset}]+title{${1:Document}})+body
<html>
source, src
<head>
<source />
<meta charset="UTF-8" />
<title> Document </title>
source:src, src:sc </head>
<source src=" " type=" " /> <body>
<picture>
input:email </body>
</html>
Alias of inp[type=email]
Alias of inp[type=date]
html:xxs
<input type="date" name=" " id=" " />
Alias of !!!xxs+doc4[xmlns=http://www.w3.org/1999/xhtml
xml:lang=${lang}]
input:datetime-local
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
Alias of inp[type=datetime-local]
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<input type="datetime-local" name=" " id=" " /> <html xmlns="http://www.w3.org/1999/xhtml"
xml:lang="en">
input:month <head>
<meta http-equiv="Content-Type"
Alias of inp[type=month]
content="text/html;charset=UTF-8" />
<input type="month" name=" " id=" " /> <title> Document </title>
</head>
input:week <body>
Alias of inp[type=week]
</body>
<input type="week" name=" " id=" " /> </html>
input:time html:5
Alias of inp[type=time] Alias of !!!+doc[lang=${lang}]
<input type="time" name=" " id=" " /> <!DOCTYPE html>
<html lang="en">
input:tel <head>
<meta charset="UTF-8" />
Alias of inp[type=tel]
<title> Document </title>
<input type="tel" name=" " id=" " /> </head>
<body>
input:number
Alias of inp[type=number] </body>
</html>
<input type="number" name=" " id=" " />
ol+
input:color
Alias of ol>li
Alias of inp[type=color]
<ol>
<input type="color" name=" " id=" " />
<li> </li>
</ol>
input:checkbox, input:c
Alias of inp[type=checkbox] ul+
<input type="checkbox" name=" " id=" " /> Alias of ul>li
<ul>
input:radio, input:r <li> </li>
Alias of inp[type=radio] </ul>
<table>
input:button, input:b <tr>
<input type="button" value=" " /> <td> </td>
</tr>
isindex </table>
<isindex />
colgroup+, colg+
input:reset Alias of colgroup>col
Alias of input:button[type=reset] <colgroup>
<col />
<input type="reset" value=" " />
</colgroup>
select
tr+
<select name=" " id=" "> </select>
Alias of tr>td
marquee <optgroup>
<marquee behavior=" " direction=" "> </marquee> <option value=" "> </option>
</optgroup>
menu:context, menu:c
pic+
Alias of menu[type=context]>
Alias of picture>source:srcset+img
<menu type="context"> </menu>
<picture>
<source srcset=" " />
menu:toolbar, menu:t
<img src=" " alt=" " />
Alias of menu[type=toolbar]>
</picture>
<menu type="toolbar"> </menu>
!!!
video <!DOCTYPE html>
<video src=" "> </video>
!!!4t
audio <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
<audio src=" "> </audio> Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
html:xml
<html xmlns="http://www.w3.org/1999/xhtml"> </html> !!!4s
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
keygen "http://www.w3.org/TR/html4/strict.dtd">
<keygen />
!!!xt
Alias of button[type=reset]
!!!xxs
<button type="reset"> </button>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
button:disabled, button:d, btn:d
Alias of button[disabled.] c
<button disabled="disabled"> </button> <!-- ${child} -->
bq
cc:ie
Alias of blockquote <!--[if IE]>
<blockquote> </blockquote> ${child}
<![endif]-->
fig
cc:noie
Alias of figure
<!--[if !IE]><!-->
<figure> </figure> ${child}
<!--<![endif]-->
figc
Alias of figcaption
<figcaption> </figcaption>
CSS
CSS module uses fuzzy search to find unknown abbreviations, e.g. ov:h == ov-h == ovh == oh.
If abbreviation wasnt found, it is transformed into property name: foo-bar foo-bar: |;
You can prefix abbreviations with hyphen to produce vendor-prefixed properties: -foo
mr margin-right: ;
Lists
mr:a margin-right:auto;
lis list-style: ;
mb margin-bottom: ;
lis:n list-style:none;
mb:a margin-bottom:auto;
lisp list-style-position: ;
ml margin-left: ;
lisp:i list-style-position:inside;
ml:a margin-left:auto;
lisp:o list-style-position:outside;
p padding: ;
list list-style-type: ;
pt padding-top: ;
list:n list-style-type:none;
pr padding-right: ;
list:d list-style-type:disc;
pb padding-bottom: ;
list:c list-style-type:circle;
pl padding-left: ;
list:s list-style-type:square;
fw font-weight: ;
Others
! !important
fw:n font-weight:normal;
@f @font-face {
fw:b font-weight:bold;
font-family: ;
fw:br font-weight:bolder; src:url(|);
}
fw:lr font-weight:lighter;
@f+ @font-face {
fs font-style:${italic}; font-family: ' FontName ';
src: url(' FileName .eot');
fs:n font-style:normal; src: url(' FileName .eot?#iefix')
format('embedded-opentype'),
fs:i font-style:italic;
url(' FileName .woff')
fs:o font-style:oblique; format('woff'),
url(' FileName .ttf')
fv font-variant: ; format('truetype'),
url(' FileName .svg# FontName
fv:n font-variant:normal; ') format('svg');
font-style: normal ;
fv:sc font-variant:small-caps;
font-weight: normal ;
fz font-size: ; }
as:a align-self:auto;
ta:j text-align:justify;
as:b align-self:baseline;
ta-lst text-align-last: ;
as:c align-self:center;
tal:a text-align-last:auto;
as:fe align-self:flex-end;
tal:l text-align-last:left;
as:fs align-self:flex-start;
tal:c text-align-last:center;
as:s align-self:stretch;
tal:r text-align-last:right;
bfv backface-visibility: ;
td text-decoration: none ;
bfv:h backface-visibility:hidden;
td:n text-decoration:none;
bfv:v backface-visibility:visible;
td:u text-decoration:underline;
bg:ie filter:progid:DXImageTransform.Microso
td:o text-decoration:overline;
ft.AlphaImageLoader(src=' x
td:l .png',sizingMethod=' crop ');
text-decoration:line-through;
cm /* ${child} */
te text-emphasis: ;
colm columns: ;
te:n text-emphasis:none;
colmc column-count: ;
te:ac text-emphasis:accent;
colmf column-fill: ;
te:dt text-emphasis:dot;
colmg column-gap: ;
te:c text-emphasis:circle;
colmr column-rule: ;
te:ds text-emphasis:disc;
colmrc column-rule-color: ;
te:b text-emphasis:before;
colmrs column-rule-style: ;
te:a text-emphasis:after;
colmrw column-rule-width: ;
th text-height: ;
colms column-span: ;
th:a text-height:auto;
colmw column-width: ;
th:f text-height:font-size;
d:ib+ display: inline-block;
th:t text-height:text-size;
*display: inline;
th:m text-height:max-size; *zoom: 1;
ti text-indent: ; fx flex: ;
whsc:bs white-space-collapse:break-strict;
bga:f background-attachment:fixed;
bga:s background-attachment:scroll;
bgp background-position: 0 0 ;
bgpx background-position-x: ;
bgpy background-position-y: ;
bgbk background-break: ;
bgbk:bb background-break:bounding-box;
bgbk:eb background-break:each-box;
bgbk:c background-break:continuous;
bgcp:bb background-clip:border-box;
bgcp:pb background-clip:padding-box;
bgcp:cb background-clip:content-box;
bgcp:nc background-clip:no-clip;
bgo background-origin: ;
bgo:pb background-origin:padding-box;
bgo:bb background-origin:border-box;
bgo:cb background-origin:content-box;
bgsz background-size: ;
bgsz:a background-size:auto;
bgsz:ct background-size:contain;
bgsz:cv background-size:cover;
Color
c color:# 000 ;
c:r color:rgb( 0 , 0 , 0 );
c:ra color:rgba( 0 , 0 , 0 , . 5 );
op opacity: ;
Generated content
cnt content:' ';
ct content: ;
q quotes: ;
q:n
quotes:none;
coi counter-increment: ;
cor counter-reset: ;
Outline
ol outline: ;
ol:n outline:none;
olo outline-offset: ;
olw outline-width: ;
olw:tn outline-width:thin;
olw:m outline-width:medium;
olw:tc outline-width:thick;
ols outline-style: ;
ols:n outline-style:none;
ols:dt outline-style:dotted;
ols:ds outline-style:dashed;
ols:s outline-style:solid;
ols:db outline-style:double;
ols:g outline-style:groove;
ols:r outline-style:ridge;
ols:i outline-style:inset;
ols:o outline-style:outset;
olc:i outline-color:invert;
Tables
tbl table-layout: ;
tbl:a table-layout:auto;
tbl:f table-layout:fixed;
cps caption-side: ;
cps:t caption-side:top;
cps:b caption-side:bottom;
ec empty-cells: ;
ec:s empty-cells:show;
ec:h empty-cells:hide;
XSL
tmatch, tm co
<xsl:template match=" " mode=" "> </xsl:template> <xsl:copy-of select=" " />
tname, tn val
<xsl:template name=" "> </xsl:template> <xsl:value-of select=" " />
ap tex
<xsl:apply-templates select=" " mode=" " /> <xsl:text> </xsl:text>
api com
<xsl:apply-imports /> <xsl:comment> </xsl:comment>
imp msg
<xsl:import href=" " /> <xsl:message terminate="no"> </xsl:message>
inc fall
<xsl:include href=" " /> <xsl:fallback> </xsl:fallback>
ch num
<xsl:choose> </xsl:choose> <xsl:number value=" " />
xsl:when, wh nam
<xsl:when test=" "> </xsl:when> <namespace-alias stylesheet-prefix=" " result-
prefix=" " />
ot
<xsl:otherwise> </xsl:otherwise> pres
<xsl:preserve-space elements=" " />
if
<xsl:if test=" "> </xsl:if> strip
<xsl:strip-space elements=" " />
par
<xsl:param name=" "> </xsl:param> proc
<xsl:processing-instruction name=" ">
pare </xsl:processing-instruction>
key xsl
<xsl:key name=" " match=" " use=" " /> Alias of !!!+xsl:stylesheet[version=1.0
xmlns:xsl=http://www.w3.org/1999/XSL/Transform]>{
|}
elem
<xsl:element name=" "> </xsl:element> <?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
attr
</xsl:stylesheet>
<xsl:attribute name=" "> </xsl:attribute>
!!!
attrs
<?xml version="1.0" encoding="UTF-8"?>
<xsl:attribute-set name=" "> </xsl:attribute-set>
cp
<xsl:copy select=" " />