Pen Settings



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


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


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.


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.


                <form id="enquiry" action="">
  <textarea maxlength="140" name="message" id="message" placeholder="Add your comment!"></textarea>
  <input type="submit" value="Add Comment">


                body {
 background: #444; 
 font-family: 'Open Sans', sans-serif;

form {
 position: relative;
 top: 40px;
 border-radius: 4px;
 width: 400px;
 height: 180px;
 margin: 0 auto;

form textarea {
 border-radius: 2px;
 box-shadow:  0px 2px 11px 0px rgba(0, 0, 0, 0.3);
 border: 1px solid #e2e6e6;
 margin: 10px 0 10px 0;
 font-family: 'Open Sans', sans-serif;
 outline: none;
 width: 395px;
 height: 100px;

form span.counter {
 float: right;
 color: #f2f2f2;

form {
 font-size: 11px;
 color: #999;
form > span {
 color: #fff; 

form input[type=submit] {
 cursor: pointer;
 box-shadow:  0px 2px 11px 0px rgba(0, 0, 0, 0.3);
 border: 1px solid #A8F1FF;
 border-radius: 2px;
 color: #fff;
 float: right;
 padding: 10px;


                $(document).ready(function () {
    var comment = $('form#enquiry textarea'),
        counter = '',
        counterValue = 140, //change this to set the max character count
        minCommentLength = 10, //set minimum comment length
        $commentValue = comment.val(),
        $commentLength = $commentValue.length,
        submitButton = $('form#enquiry input[type=submit]').hide();
    $('form').prepend('<span class="counter"></span>').append('<p class="info">Min length: <span></span></p>');
    counter = $('span.counter');
    counter.html(counterValue); //display your set max length
    comment.attr('maxlength', counterValue); //apply max length to textarea
    $('form').find(' > span').html(minCommentLength);
    // everytime a key is pressed inside the textarea, update counter
    comment.keyup(function () {
      var $this = $(this);
      $commentLength = $this.val().length; //get number of characters
      counter.html(counterValue - $commentLength); //update counter
      if ($commentLength > minCommentLength - 1) {
      } else {