Pen Settings

HTML

CSS

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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

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

              
                <body>
  <div class="wrapper">
    <div class="header">
      <h1>Header</h1>      
    </div>
    <div class="content">
      <span>To add more paragraphs click on the <em>Header</em>. To delete paragraphs just click on it.</span>
      <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas aliquam velit eu ultricies iaculis. Pellentesque iaculis molestie tellus ac sagittis. In vehicula nisl nisl, ornare lobortis lacus pulvinar quis. Maecenas sapien nunc, rhoncus in ipsum ac, semper vehicula nibh. Suspendisse viverra odio sed aliquam lobortis. Ut volutpat ipsum non luctus ornare. Nunc nec nibh et orci rhoncus ultricies. Nunc pretium ligula ex, at malesuada sapien dignissim vel. Cras placerat odio ut vulputate fringilla. Morbi dictum risus ut dolor accumsan bibendum. Nam scelerisque volutpat sapien vitae molestie. Ut in mauris justo.</p>
    </div>
  </div>
  <div class="footer">
    <p>Footer area text goes here.</p>
  </div>
</body>
              
            
!

CSS

              
                * {
  margin: 0;
}

html,
body {
  height: 100%;
}

.wrapper {
  min-height: 100%;
  margin-bottom: -80px;
}

span {
  display: block;
  font-weight: 700;
}

.wrapper:after {
  content: "";
  display: block;
  height: 80px;
}

.header {
  background-color: #CCC;
  height: 80px;
  width: 100%;
}

.header h1 {
  margin: 0 auto;
  width: 90%;
  line-height: 80px;
}

h1 span {
  font-size: .5em;
}

.content p,
.content span {
  margin: 20px auto;
  width:80%;
}

.footer {
  background-color: #AAA;
  height: 80px;
  width: 100%;
}

.footer p {
  margin: 0 auto;
  padding-top: 10px;
  width: 90%;
}
              
            
!

JS

              
                $(".header").on("click", function() {
  $("<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam ante purus, efficitur ac laoreet facilisis, ultricies nec tellus. Praesent luctus arcu id volutpat cursus. Praesent vulputate quam vel pharetra pharetra. Aliquam vehicula dictum consequat. Curabitur laoreet bibendum dui, in consequat tortor fermentum quis. Cras aliquet pellentesque finibus. Mauris eleifend vestibulum ipsum et venenatis. Nulla iaculis eget nisl in semper.</p>").appendTo(".content");
});

$(".content").on("click", "p" function() {
  $(this).remove();
});

              
            
!
999px

Console