Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <div id="wrapper" class="col-md-6">
<!-- Nav tabs -->
<ul id="codes" class="nav nav-tabs" role="tablist">
  <li role="presentation" class="active">
    <a href="#tab-1-content" aria-controls="home" role="tab" data-toggle="tab">Tab 1</a></li>
  <li role="presentation">
    <a href="#tab-2-content" aria-controls="profile" role="tab" data-toggle="tab">Tab 2</a
  </li>
</ul>

<!-- Tab panes -->
<div class="tab-content">
  <div role="tabpanel" class="tab-pane active" id="tab-1-content">
    <pre class="prettyprint linenums lang-java">
  // Everything is controlled with id="codes"
  // lang-java class is added to &lt;pre&gt; to read # tag
  &lt;ul id="codes" class="nav nav-tabs" role="tablist"&gt;
    .......
  &lt;/ul&gt;
  //@Override prettyprint with custom colours
  //Change the colour codes of the codes in here.
  pre .str { color: #fdb839; } /* string   */
  pre .kwd { color: #fdb839; }
  pre .com { color: #B3B3B3; } /* comment  */
  pre .typ { color: #fdb839; } /* type     */
  pre .lit { color: #cd5c5c; } /* literal  */
  pre .pun { color: #fdb839; } /* punctuation */
  pre .pln { color: #fdb839; } /* plaintext */
  pre .tag { color: #fdb839; } /* html/xml tag     */
  pre .atn { color: #bdb76b; } /* attribute name   */
  pre .atv { color: #fdb839; } /* attribute value  */
  pre .dec { color: #fdb839; } /* decimal          */
    </pre>
</div>
    <div role="tabpanel" class="tab-pane" id="tab-2-content">
      <pre class="prettyprint linenums lang-java">
  // To show line numbers add linenums class to &lt;pre&gt;
  // Change the line border color 
  .linenums li{
     border-left: 1px solid colour;
  }
  
  
  


    
  
  
  
  
  
  
  
      </pre>
    </div>
  </div>
</div>
              
            
!

CSS

              
                #wrapper{
  margin: 20px auto;
}
#codes{
  border-bottom: 1px solid #5F5F5F;
  background-color: #34312c;
  border-top-right-radius: 4px;
  border-top-left-radius: 4px;
}
#codes>li {
  padding: 8px 0px 8px 8px;
}
#codes>li>a {
  position: relative;
  display: block;
  padding: 3px 15px;
  border-radius: 4px;
  color: #fefdf9;
  cursor: pointer !important;
}
#codes>li>a:active,
#codes>li>a:focus,
#codes>li>a:hover,
#codes>li.active>a,
#codes>li.active>a:focus,
#codes>li.active>a:hover{
  position: relative;
  display: block;
  padding: 3px 15px;
  border-radius: 4px;
  color: #fdb839;
  cursor: default;
  background-color: #655F56;
  border: 1px solid #3e3a33;
  border-bottom-color: transparent;
}
/*Override prettify design*/
pre, code{
  white-space: pre;
  border: 0 !important;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}
/* UXCam scheme for google prettify*/
pre.prettyprint { display: block; background-color: #3e3a33;}
pre .nocode { background-color: none; color: #000; }
pre .str { color: #fdb839; } /* string */
pre .kwd { color: #fdb839; }
pre .com { color: #B3B3B3; } /* commen */
pre .typ { color: #fdb839; } /* type */
pre .lit { color: #cd5c5c; } /* literal */
pre .pun { color: #fff; }    /* punctuation */
pre .pln { color: #fdb839; }    /* plaintext */
pre .tag { color: #fdb839; } /* html/xml tag */
pre .atn { color: #bdb76b; } /* attribute name */
pre .atv { color: #fdb839; } /* attribute value */
pre .dec { color: #fdb839; } /* decimal */

/* Specify class=linenums on a pre to get line numbering */
ol.linenums { 
  margin-top: 0; 
  margin-bottom: 0; 
  color: #AEAEAE; 
} 
/* IE indents via margin-left */
li.L0,li.L1,li.L2,li.L3,li.L4,li.L5,li.L6,li.L7,li.L8 { 
  list-style-type: decimal !important; 
}
/* Alternate shading for lines */
li.L1,li.L3,li.L5,li.L7,li.L9 { 
  background-color: transparent !important;
}
.linenums li{
  border-left: 1px solid #656565;
}

@media print {
  pre .str, code .str { color: #060; }
  pre .kwd, code .kwd { color: #006; }
  pre .com, code .com { color: #600; }
  pre .typ, code .typ { color: #404; }
  pre .lit, code .lit { color: #044; }
  pre .pun, code .pun { color: #440; }
  pre .pln, code .pln { color: #000; }
  pre .tag, code .tag { color: #006; }
  pre .atn, code .atn { color: #404; }
  pre .atv, code .atv { color: #060; }
}
              
            
!

JS

              
                
              
            
!
999px

Console