Synthaxe en Emmet

Emmet est un utilitaire de saisie de texte permettant de gagner du temps de saisie. apres avoir noté les raccourcis, il suffit d'appuyer sur Tab et hop! il fait le reste ...

Inclure: >

  • nav>ul>li
    • <nav>
      • <ul>
        • <li></li>
        • </ul>
      • </nav>

Ajouter: +

  • div+p+bq
    • <div></div>
    • <p></p>
    • <blockquote></blockquote>

Multiplier: *

  • ul>li*5
    • <ul>
      • <li></li>
      • <li></li>
      • <li></li>
      • <li></li>
      • <li></li>
    • </ul>

A la ligne: ^

  • 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>

Numeroter: $

  • ul>li.item$*5
    • <ul>
      • <li class="item1"></li>
      • <li class="item2"></li>
      • <li class="item3"></li>
      • <li class="item4"></li>
      • <li class="item5"></li>
    • </ul>
  • h$[title=item$]{Header $}*3
    • <h1 title="item1">Header 1</h1>
    • <h2 title="item2">Header 2</h2>
    • <h3 title="item3">Header 3</h3>
  • ul>li.item$$$*5
    • <ul>
      • <li class="item001"></li>
      • <li class="item002"></li>
      • <li class="item003"></li>
      • <li class="item004"></li>
      • <li class="item005"></li>
    • </ul>
  • ul>li.item$@-*5
    • <ul>
      • <li class="item5"></li>
      • <li class="item4"></li>
      • <li class="item3"></li>
      • <li class="item2"></li>
      • <li class="item1"></li>
    • </ul>
  • ul>li.item$@3*5
    • <ul>
      • <li class="item3"></li>
      • <li class="item4"></li>
      • <li class="item5"></li>
      • <li class="item6"></li>
      • <li class="item7"></li>
    • </ul>

Grouper: ()

  • 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>
        • <dd></dd>
        • <dt></dt>
      • </dl>
    • </div>
    • <footer>
      • <p></p>
    • </footer>

Remplir entre les balises: {}

  • a{Click me}
    • <a href="">Click me</a>
  • p>{Click }+a{here}+{ to continue}
    • <p>Click <a href="">here</a> to continue</p>

ID, Classes et Tableau:

  • #toto
    • <div id="toto"></div>
  • .title
    • <div class="title"></div>
  • em>.class
    • <em><span class="class"></span></em>
  • ul>.class
    • <ul>
      • <li class="class"></li>
    • </ul>
  • form#search.wide
    • <form id="search" class="wide"></form>
  • p.class1.class2.class3
    • <p class="class1 class2 class3"></p>
  • table>.row>.col
    • <table>
      • <tr class="row">
        • <td class="col"></td>
      • </tr>
    • </table>

Attributs personnalisés:

  • 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>

Raccourcis HTML

  • !
    • <!DOCTYPE html>
    • <html lang="en">
    • <head>
      • <meta charset="UTF-8" />
      • <title>Document</title>
    • </head>
    • <body>
    • </body>
    • </html>
  • a
    • <a href=""></a>
  • a:link
    • <a href="http://"></a>
  • a:mail
    • <a href="mailto:"></a>
  • br
    • <br />
  • link
    • <link rel="stylesheet" href="" />
  • link:css
    • <link rel="stylesheet" href="style.css" />
  • link:favicon
    • <link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
  • script
    • <script></script>
  • img
    • <img src="" alt="" />
  • form
    • <form action=""></form>
  • label
    • <label for=""></label>
  • input
    • <input type="text" />
  • inp
    • <input type="text" name="" id="" />
  • input:search
    • <input type="search" name="" id="" />
  • input:email
    • <input type="email" name="" id="" />
  • input:p
    • <input type="password" name="" id="" />
  • input:date
    • <input type="date" name="" id="" />
  • input:tel
    • <input type="tel" name="" id="" />
  • input:number
    • <input type="number" name="" id="" />
  • input:c
    • <input type="checkbox" name="" id="" />
  • input:r
    • <input type="radio" name="" id="" />
  • opt
    • <option value=""></option>
  • video
    • <video src=""></video>
  • audio
    • <audio src=""></audio>
  • btn
    • <button></button>
  • btn:s
    • <button type="submit"></button>
  • sect
    • <section></section>
  • art
    • <article></article>
  • hdr
    • <header></header>
  • ftr
    • <footer></footer>
  • str
    • <strong></strong>
  • ol+
    • <ol>
      • <li></li>
    • </ol>
  • ul+
    • <ul>
      • <li></li>
    • </ul>
  • table+
    • <table>
      • <tr>
        • <td></td>
      • </tr>
    • </table>
  • tr+
    • <tr>
      • <td></td>
    • </tr>
  • optg+
    • <optgroup>
      • <option value=""></option>
    • </optgroup>

Raccourcis CSS

  • pos
    • position:relative;
  • pos:s
    • position:static;
  • pos:a
    • position:absolute;
  • pos:r
    • position:relative;
  • pos:f
    • position:fixed;
  • t
    • top:;
  • r
    • right:;
  • b
    • bottom:;
  • l
    • left:;
  • z
    • z-index:;
  • fl:n
    • float:none;
  • fl:l
    • float:left;
  • fl:r
    • float:right;
  • cl
    • clear:both;
  • cl:l
    • clear:left;
  • cl:r
    • clear:right;
  • d:n
    • display:none;
  • d:b
    • display:block;
  • d:i
    • display:inline;
  • d:ib
    • display:inline-block;
  • ov
    • overflow:hidden;
  • ovx
    • overflow-x:hidden;
  • ovy
    • overflow-y:hidden;
  • m
    • margin:;
  • m:a
    • margin:auto;
  • mt
    • margin-top:;
  • mr
    • margin-right:;
  • mb
    • margin-bottom:;
  • ml
    • margin-left:;
  • p
    • padding:;
  • pt
    • padding-top:;
  • pr
    • padding-right:;
  • pb
    • padding-bottom:;
  • pl
    • padding-left:;
  • w
    • width:;
  • w:a
    • width:auto;
  • h
    • height:;
  • h:a
    • height:auto;
  • maw
    • max-width:;
  • mah
    • max-height:;
  • miw
    • min-width:;
  • mih
    • min-height:;
  • fw
    • font-weight:;
  • fw:b
    • font-weight:bold;
  • fs:i
    • font-style:italic;
  • fz
    • font-size:;
  • ff
    • font-family:;
  • va:t
    • vertical-align:top;
  • va:m
    • vertical-align:middle;
  • va:b
    • vertical-align:bottom;
  • ta
    • text-align:left;
  • ta:l
    • text-align:left;
  • ta:c
    • text-align:center;
  • ta:r
    • text-align:right;
  • ta:j
    • text-align:justify;
  • td
    • text-decoration:none;
  • tt
    • text-transform:uppercase;
  • tt:c
    • text-transform:capitalize;
  • bgc
    • background-color:#fff;
  • bgc:t
    • background-color:transparent;
  • bgi
    • background-image:url();
  • bgi:n
    • background-image:none;
  • bgr:n
    • background-repeat:no-repeat;
  • bgp
    • background-position:0 0;
  • bgsz
    • background-size:;
  • bgsz:cv
    • background-size:cover;
  • c
    • color:#000;
  • c:r
    • color:rgb(0, 0, 0);
  • c:ra
    • color:rgba(0, 0, 0, .5);
  • bd
    • border:;
  • bdt
    • border-top:;
  • bdr
    • border-right:;
  • bdb
    • border-bottom:;
  • bdl
    • border-left:;
  • bdrs
    • border-radius:;
  • lis:n
    • list-style:none;
  • !
    • !important
  • @f
    • @font-face {
      • font-family:;
      • src:url(|);
    • }
  • @m
    • @media screen {
    • }

A propos

Cheat-sheet du plugin EMMET réalisé lors de l'autoformation au sain du programme SIMPLON. Je fais partie de la 1ère promotion de l'essaimage de Roubaix

simplon roubaix

Contact

Des remarques? contactez-moi!

Fan? suivez-moi!