HTML Abbreviations
Element Shortcuts
divCreate
pCreate

h1Create

aCreate
imgCreate
inputCreate
btnCreate
link:cssLink tag for CSS stylesheet
HTML Boilerplate
! → full HTML5 boilerplate doc → HTML5 doctype only
Implicit Tags
.classResolves to
ul>.itemChild resolves to
  • table>.rowChild resolves to
    select>.optChild resolves to
    Nesting
    Nesting Operators
    >Child element
    +Sibling element
    ^Climb up one level
    ^^Climb up two levels
    Nesting Examples
    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
    Grouping
    Parentheses Grouping
    div>(header>nav)+main+footer → groups header>nav as a unit (div>h2+p)*3 → repeat grouped structure 3 times
    Complex Layout
    .container>(header>h1+nav>ul>li*3)+main+footer → full page layout skeleton
    Multiplication
    Repeat Operator
    li*5Create 5
  • elements
  • div>p*3Div with 3 child paragraphs
    ul>li*4>aList with 4 items, each containing a link
    tr>td*4Table row with 4 cells
    Multiplication Examples
    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
    Numbering
    Item Numbering ($)
    $Sequential number (1, 2, 3...)
    $$Zero-padded two digits (01, 02...)
    $$$Zero-padded three digits (001, 002...)
    $@3Start numbering from 3
    $@-Reverse numbering (descending)
    $@-3Reverse numbering starting from 3
    Numbering Examples
    li.item$*3 → item1, item2, item3 li.item$$*3 → item01, item02, item03 li.item$@3*3 → item3, item4, item5
    Attributes
    ID and Class
    #idAdd id attribute:
    .classAdd class:
    .c1.c2Multiple classes: class="c1 c2"
    #main.containerID + class combined
    Custom Attributes
    td[colspan=2] → a[href=#]{Click} → Click input[type=email placeholder=Email] div[data-id=$]*3 → data-id="1", "2", "3"
    Text
    Text Content ({})
    p{Hello}

    Hello

    a{Click me}Click me
    p{Item $}*3Item 1, Item 2, Item 3
    Text with Nesting
    p>{Click }+a{here}+{ to continue} →

    Click here to continue

    ul>li{Item $}*4 → list with numbered items
    CSS Abbreviations
    Box Model
    m10margin: 10px;
    m10-20margin: 10px 20px;
    p10padding: 10px;
    w100width: 100px;
    w100pwidth: 100%;
    h50height: 50px;
    Display & Position
    d:fdisplay: flex;
    d:gdisplay: grid;
    d:ndisplay: none;
    d:bdisplay: block;
    pos:rposition: relative;
    pos:aposition: absolute;
    Flexbox
    jc:cjustify-content: center;
    jc:sbjustify-content: space-between;
    ai:calign-items: center;
    fxd:cflex-direction: column;
    fw:wflex-wrap: wrap;
    Typography & Colors
    fz14font-size: 14px;
    fw:bfont-weight: bold;
    ta:ctext-align: center;
    c:#333color: #333;
    bgc:#fffbackground-color: #fff;