cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

            
              <div class="container-fluid">
  <div class="row topLine">
    <div class="col-sm-5">
      <h1> Emmet Dojo:</h1>
    </div>
    <div class="col-sm-7">
      <button type="button" class="btn btn-danger float-right" onClick="clearContents()">CLEAR</button>
    </div>
  </div>
  <textarea class="form-control" rows="10" id="emmetT" placeholder="Instructions: type emmet expressions (consult Syntax, Examples and HTML below) + tab"></textarea>

  <div class="row">
    <br />
    <div class="col-sm-4">
      <h3>Syntax :</h3>
      <div class="well pre-scrollable columnA">
        <ul class="list-unstyled">
          <li>Child: <kbd>></kbd></li>
          <li>Sibling: <kbd>+</kbd></li>
          <li>Climb-up: <kbd>^</kbd></li>
          <li>Multiplication: <kbd>*</kbd></li>
          <li>Grouping: <kbd>()</kbd></li>
          <li>Id: <kbd>elem#</kbd></li>
          <li>Class: <kbd>elem.</kbd></li>
          <li>Custom attributes: <kbd>[attr]</kbd></li>
          <li>Item numbering: <kbd>$</kbd></li>
          <li>Text: <kbd>{}</kbd></li>
        </ul>
      </div>

    </div>

    <div class="col-sm-4">
      <h3>Examples :</h3>
      <div class="well pre-scrollable columnB">
        <ul class="list-unstyled">
          <li>nav>ul>li</li>

          <li>div+p+bq</li>
          <li>div+div>p>span+em^bq</li>
          <li>div+div>p>span+em^^^bq</li>
          <li>ul>li*5</li>
          <li>div>(header>ul>li*2>a)+footer>p</li>
          <li>(div>dl>(dt+dd)*3)+footer>p</li>
          <li>div#header</li>
          <li>div.class1</li>
          <li>div#footer.class1.class2.class3</li>
          <li>td[title="Hello world!" colspan=3]</li>
          <li>ul>li.item$*5</li>
          <li>ul>li.item$$$*5</li>
          <li>ul>li.item$@-*5</li>
          <li>ul>li.item$@3*5</li>
          <li>ul>li.item$@-3*5</li>
          <li>a{Click me}</li>
        </ul>
      </div>
    </div>

    <div class="col-sm-4">
      <h3>HTML :</h3>
      <div class="well pre-scrollable columnC">
        <ul class="list-unstyled">
          <li><kbd>!</kbd> html:5</li>
          <li><kbd>a:link</kbd> </li>
          <li><kbd>br</kbd></li>
          <li><kbd>link:css</kbd></li>
          <li><kbd>form:post</kbd></li>
          <li><kbd>btn</kbd></li>
          <li><kbd>lorem</kbd></li>
        </ul>
      </div>
    </div>
  </div>
  <div class="panel panel-default">
  <div class="panel-body">
    Official Emmet site: <a href="http://emmet.io" target="_blank">emmet.io</a>&nbsp;&nbsp;&nbsp;
<a href="http://docs.emmet.io/cheat-sheet/" target="_blank">Cheat Sheet</a>
  </div>
</div>
  </div>
</div>
            
          
!
            
              body{
  background-color:#222;
/*   padding:10px; */
}

h1{
color: cornflowerBlue;
  margin:0;
}

h3, h5{
color: cornflowerBlue;
}

.topLine{
  margin-bottom:10px;
}

.columnA{
  height:200px;
  max-height: 200px;
/*   min-width: 240px; */
  font-size:16px;
}

.columnB{
  height:200px;
  max-height: 200px;
/*   min-width: 300px; */
  font-size:15px;
}
.columnB ul{
  margin-left:-10px;
}

.columnC{
  height:200px;
  max-height: 200px;
  padding-left:10px;
  font-size:16px;
}

.btn-danger{
  margin-top:6px;
}

textarea{
  margin-bottom:-30px;
}


            
          
!
            
              // Magic Sauce:
// https://github.com/emmetio/textarea
// Only HTML for now


emmet.require('textarea').setup({
    pretty_break: true, // enable formatted line breaks (when inserting 
                        // between opening and closing tag) 
    use_tab: true       // expand abbreviations by Tab key
});

function clearContents(){
  document.getElementById("emmetT").value = '';
}


            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console