Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource


Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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


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.

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 Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.


                <form id="commentForm" class="comment-form">
  <fieldset id="commentFormBody" class="comment-form-body">
    <div class="comment-form-title">Post a comment</div>
    <textarea id="commentText" class="comment-form-textarea">
What if I quickly click Submit multiple times?
    <div class="comment-form-actions">
      <input id="commentSubmitButton" class="comment-form-action-submit" type="submit" value="Submit"> 

<div class="comment-feed">
  <div class="comment-feed-title">Comments</div>
  <ol id="commentFeedList" class="comment-feed-list">

<script id="commentTemplate" type="text/x-handlebars-template">
  <li class="comment-feed-item">
     <div class="comment-feed-item-timestamp">
       <time datetime="{{isoDate}}">{{humanDate}}</time>
     <div class="comment-feed-item-message">{{comment}}</div>


  box-sizing: border-box

  font-size: 1.5em
  margin-bottom: .5em
    border: none
    margin: 0
    padding: 0
    width: 300px
    height: 70px
    padding: .5em
    padding: .5em 2em
  margin-top: 2em
    list-style: none
    padding: 0
    margin: 1em 0 0 0
      padding: 0
      margin-top: 1em
      border-top: solid 1px #ccc
      padding: .5em 0
        border-top: none
        color: #444
        margin-bottom: .5em
        font-size: 1.2em



                function submitComment() {
  let comment = $('#commentText').val().trim();

function fakePost(comment) {
  return new Promise((resolve, reject) => {
    setTimeout(() => {
      let data = {
        comment: comment,
        date: new Date()
    }, 2000);

function setLoading() {
  $('#commentFormBody').attr('disabled', true);

function resetLoading() {
  $('#commentFormBody').attr('disabled', false);

function insertComment(data) {
  let comment = {
    comment: data.comment,
  let html = commentView(comment);

const commentView = Handlebars.compile($('#commentTemplate').html());

function main() {
  const mockComment = {
    comment: 'Great post!',
    date: new Date()


  $('#commentForm').on('submit', (e) => {
    return false;