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.


                <div id="app">
  <h1>Shopping List</h1>
    <input type="text" id="item-input">
    <button id="add-btn">Add Item</button>
  <ul id="shopping-list">


                body {
  font-family: "Comic Sans MS", cursive, sans-serif;
  text-align: center;
  color: #888;
  margin-left: 42%;

#app {
  padding: 20px;
  background-color: #fff085;
  width: 280px;

ul {
  list-style-type: none;
  margin: 30px 0;
  padding: 0;

#shopping-list li {
  border-bottom: 1px solid #aaa;
  padding: 4px;

.list-item {
  color: red;
  font-family: Arial;


                  $(document).ready(function() {
    // submit input on keypress 'enter'
    $('#item-input').keypress(function(event) {
      if (event.which == 13) {
    // #add-btn click function to add the input to the list
    $('#add-btn').on('click', function() {
      //when this button is clicked, you will append what the user entered in the text field to your list. Then you will style it by making the font-family Arial and the color red.
      // get value of #item-input
      var item = $('#item-input').val();
      // if the input is blank, just re-focus the input; else append the item
      if (item == '') {
      } else {
        // create and append the li to #shopping-list -- make sure to add the .list-item class
        $('#shopping-list').append('<li class="list-item">' + item + '&nbsp&nbsp&nbsp<button>Remove</button></li>');
    // remove item
    $('ul').on('click', 'li', function() {