! → full HTML5 boilerplate
doc → HTML5 doctype only
Tag Implisit
.class
Menjadi
ul>.item
Child menjadi
table>.row
Child menjadi
select>.opt
Child menjadi
Nesting
Operator Nesting
>
Elemen child
+
Elemen sibling
^
Naik satu level
^^
Naik dua level
Contoh Nesting
div>ul>li → nested child elements
div+p+footer → sibling elements
div>p>span^h2 → climb up: h2 is sibling of p
div>p>span^^h2 → climb up twice: h2 sibling of div
Pengelompokan
Pengelompokan dengan Tanda Kurung
div>(header>nav)+main+footer
→ groups header>nav as a unit
(div>h2+p)*3
→ repeat grouped structure 3 times
Layout Kompleks
.container>(header>h1+nav>ul>li*3)+main+footer
→ full page layout skeleton
Perkalian
Operator Repeat
li*5
Buat 5 elemen
div>p*3
Div dengan 3 paragraf child
ul>li*4>a
List dengan 4 item, masing-masing berisi link
tr>td*4
Baris tabel dengan 4 sel
Contoh Perkalian
ul>li.item*5 → 5 list items with class
table>tr*3>td*4 → 3x4 table grid
.row>.col*3>p{Content} → 3-column row with text