基本階層語法
-
nav>ul>li
<nav> |
加入運算式「*」
-
ul>li*5
<ul> |
加入字元變數「$」
-
ul>li.item$*5
<ul> |
-
h$[title=item$]{Header $}*3
<h1 title="item1">Header 1</h1> |
-
ul>li.item$$$*5
<ul> |
-
ul>li.item$@-*5
<ul> |
-
ul>li.item$@3*5
<ul> |
-
form#search.wide
<form id="search" class="wide"></form> |
-
p.class1.class2.class3
<p class="class1 class2 class3"></p> |
ID and CLASS attributes 快速輸出id和class標籤結構
-
#header<div id="header"></div>
-
.header<div class="header"></div>
Sibling: + 組合標籤
-
div+p+bq<div></div>
<p></p>
<blockquote></blockquote>
Climb-up: ^
-
div+div>p>span+em^bq<div></div>
<div>
<p>
<span></span>
<em></em>
</p>
<blockquote></blockquote>
</div> -
div+div>p>span+em^^bq<div></div>
<div>
<p>
<span></span>
<em></em>
</p>
</div>
<blockquote></blockquote>
Grouping: ()
-
div>(header>ul>li*2>a)+footer>p<div>
<header>
<ul>
<li><a href=""></a></li>
<li><a href=""></a></li>
</ul>
</header>
<footer>
<p></p>
</footer>
</div> -
(div>dl>(dt+dd)*3)+footer>p<div>
<dl>
<dt></dt><dd></dd>
<dt></dt><dd></dd>
<dt></dt><dd></dd>
</dl>
</div>
<footer>
<p></p>
</footer>
Custom attributes 自定義對象
-
p[title="Hello world"]<p title="Hello world"></p>
-
td[rowspan=2 colspan=3 title]<td rowspan="2" colspan="3" title=""></td>
-
[a='value1' b="value2"]<div a="value1" b="value2"></div>
Text: {}
-
a{Click me}<a href="">Click me</a>
-
p>{Click }+a{here}+{ to continue}<p>Click<a href="">here</a>to continue</p>
Implicit tag names
-
.class<div class="class"></div>
-
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:5
<html lang="en">
<head><meta charset="UTF-8" />
<title>Document</title>
</head>
<body>
</body>
</html>
html元素快速輸出
-
a<a href=""></a>
-
a:link<a href="http://"></a>
-
a:mail<a href="mailto:"></a>
-
abbr<abbr title=""></abbr>
-
acronym<acronym title=""></acronym>
-
base<base href="" />
-
basefont<basefont />
-
br<br />
-
frame<frame />
-
hr<hr />
-
bdo<bdo dir=""></bdo>
-
bdo:r<bdo dir="rtl"></bdo>
-
bdo:l<bdo dir="ltr"></bdo>
-
col<col />
-
link<link rel="stylesheet" href="" />
-
link:css<link rel="stylesheet" href="style.css" />
-
link:print<link rel="stylesheet" href="print.css" media="print" />
-
link:favicon<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
-
link:touch<link rel="apple-touch-icon" href="favicon.png" />
-
link:rss<link rel="alternate" type="application/rss+xml" title="RSS" href="rss.xml" />
-
link:atom<link rel="alternate" type="application/atom+xml" title="Atom" href="atom.xml" />
-
meta<meta />
-
meta:utf<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
-
meta:win<meta http-equiv="Content-Type" content="text/html;charset=windows-1251" />
-
meta:vp<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />
-
meta:compat<meta http-equiv="X-UA-Compatible" content="IE=7" />
-
style<style></style>
-
script<script></script>
-
script:src<script src=""></script>
-
img<img src="" alt="" />
-
iframe<iframe src="" frameborder="0"></iframe>
-
embed<embed src="" type="" />
-
object<object data="" type=""></object>
-
param<param name="" value="" />
-
map<map name=""></map>
-
area<area shape="" coords="" href="" alt="" />
-
area:d<area shape="default" href="" alt="" />
-
area:c<area shape="circle" coords="" href="" alt="" />
-
area:r<area shape="rect" coords="" href="" alt="" />
-
area:p<area shape="poly" coords="" href="" alt="" />
-
form<form action=""></form>
-
form:get<form action="" method="get"></form>
-
form:post<form action="" method="post"></form>
-
label<label for=""></label>
-
input<input type="text" />
-
inp<input type="text" name="" id="" />
-
input:hidden或input[type=hidden name]或input:h或input:hidden<input type="hidden" name="" />
-
input:text或input:t或inp<input type="text" name="" id="" />
-
input:search或inp[type=search]<input type="search" name="" id="" />
-
input:email或inp[type=email]<input type="email" name="" id="" />
-
input:url或inp[type=url]<input type="url" name="" id="" />
-
input:password或inp[type=password]或input:p或input:password<input type="password" name="" id="" />
-
input:datetime或inp[type=datetime]<input type="datetime" name="" id="" />
-
input:date或inp[type=date]<input type="date" name="" id="" />
-
input:datetime-local或inp[type=datetime-local]<input type="datetime-local" name="" id="" />
-
input:month或inp[type=month]<input type="month" name="" id="" />
-
input:week或inp[type=week]<input type="week" name="" id="" />
-
input:time或inp[type=time]<input type="time" name="" id="" />
-
input:number或inp[type=number]<input type="number" name="" id="" />
-
input:color或inp[type=color]<input type="color" name="" id="" />
-
input:c或input:checkbox<input type="checkbox" name="" id="" />
-
input:radio或inp[type=radio]或input:r<input type="radio" name="" id="" />
-
input:range或inp[type=range]<input type="range" name="" id="" />
-
input:file或inp[type=file]或input:f<input type="file" name="" id="" />
-
input:submit或input:s<input type="submit" value="" />
-
input:image<input type="image" src="" alt="" />
-
input:image或input:i<input type="image" src="" alt="" />
-
input:button<input type="button" value="" />
-
input:button或input:b<input type="button" value="" />
-
isindex<isindex />
-
input:reset或input:button[type=reset]<input type="reset" value="" />
-
select<select name="" id=""></select>
-
option<option value=""></option>
-
textarea<textarea name="" id="" cols="30" rows="10"></textarea>
-
menu:context或menu[type=context]>或menu:c<menu type="context"></menu>
-
menu:toolbar或menu[type=toolbar]>或menu:t<menu type="toolbar"></menu>
-
video<video src=""></video>
-
audio<audio src=""></audio>
-
html:xml<html xmlns="http://www.w3.org/1999/xhtml"></html>
-
keygen<keygen />
-
command<command />
-
bq或blockquote<blockquote></blockquote>
-
acr或acronym<acronym title=""></acronym>
-
fig或figure<figure></figure>
-
figc或figcaption<figcaption></figcaption>
-
ifr或iframe<iframe src="" frameborder="0"></iframe>
-
emb或embed<embed src="" type="" />
-
obj或object<object data="" type=""></object>
-
src或source<source></source>
-
cap或caption<caption></caption>
-
colg或colgroup<colgroup></colgroup>
-
fst或fset或fieldset<fieldset></fieldset>
-
btn或button<button></button>
-
btn:b或button[type=button]<button type="button"></button>
-
btn:r或button[type=reset]<button type="reset"></button>
-
btn:s或button[type=submit]<button type="submit"></button>
-
optg或optgroup<optgroup></optgroup>
-
opt或option<option value=""></option>
-
tarea或textarea<textarea name="" id="" cols="30" rows="10"></textarea>
-
leg或legend<legend></legend>
-
sect或section<section></section>
-
art或article<article></article>
-
hdr或header<header></header>
-
ftr或footer<footer></footer>
-
adr或address<address></address>
-
dlg或dialog<dialog></dialog>
-
str或strong<strong></strong>
-
prog或progress<progress></progress>
-
datag或datagrid<datagrid></datagrid>
-
datal或datalist<datalist></datalist>
-
kg或keygen<keygen />
-
out或output<output></output>
-
det或details<details></details>
-
cmd或command<command />
-
ol+或ol>li<ol><li></li></ol>
-
ul+或ul>li<ul><li></li></ul>
-
dl+或dl>dt+dd<dl><dt></dt><dd></dd></dl>
-
map+或map>area<map name=""><area shape="" coords="" href="" alt="" /></map>
-
table+或table>tr>td<table><tr><td></td></tr></table>
-
colgroup+或colg+或colgroup>col<colgroup> <col /> </colgroup>
-
tr+或tr>td<tr><td></td></tr>
-
select+或select>option<select name="" id=""> <option value=""></option> </select>
-
optgroup+或optg+或optgroup>option<optgroup><option value=""></option></optgroup>
-
!!! -
!!!4t -
!!!4s -
!!!xt -
!!!xs -
!!!xxs -
c<!-- ${child} -->
-
cc:ie6<!--[if lte IE 6]> ${child} <![endif]-->
-
cc:ie<!--[if IE]> ${child} <![endif]-->
-
cc:noie<!--[if !IE]><!--> ${child} <!--<![endif]-->