History
Zen coding
a speedy way of writing HTML codes using CSS-like selector like syntax. It’s originally proposed by Vadim Makeev, 2008, being famous after matured by Sergey Chikuyonok, 2009. It then evolved into Emmet
, 2013.
A simple example
The following code:
div#content>h1+p
generates:
<div id="content">
<h1></h1>
<p></p>
</div>
Basic usage
- document
html:5
or!
- easy add
- class,
.
- id,
#
- text,
{}
- attribute,
[]
- class,
- nesting
- child,
>
- sibling,
+
- upper level,
^
- child,
- grouping,
()
- implicit tag names[1]
- default,
div
li
forul
andol
tr
fortable
,tbody
,thead
andtfoot
td
fortr
option
forselect
andoptgroup
- default,
- multiplication,
*
- numbering,
$
lorem
orlipsum
lorem
N will generate N random words.
- Emmet is intelligent to guess the tag name omited. For example,
.item
in<ul>
will generate<li class="item"></li>
. ↩