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.


                <h1>My Awesome Heading</h1>

<img src="" />

<p>Bacon ipsum dolor sit amet chicken hamburger short ribs strip steak tenderloin, bresaola kevin fatback frankfurter. Pancetta t-bone ham hock, pork loin andouille sirloin pork chop kielbasa tongue. Flank shoulder porchetta chicken, short loin ham hock sausage frankfurter. Shank meatloaf porchetta short loin chicken, jowl tail flank frankfurter pig. Tri-tip biltong ribeye t-bone flank beef ribs landjaeger meatloaf tenderloin andouille drumstick kevin venison jerky. Pork chop pastrami bresaola jerky shank pork loin tail capicola venison beef ribs ham hock spare ribs filet mignon ham ribeye. Tail pork belly jerky, kielbasa tenderloin bacon ball tip short loin beef chuck prosciutto.</p>

<label for="styleSwitcher">Choose a style: </label>
<select id="styleSwitcher">
  <option value="normal">Normal</option>
  <option value="high-contrast">High Contrast</option>
  <option value="print">Print</option>


                /* Normal styles */
h1 {
  text-shadow: 2px 2px gray;

img {
  float: right;
  width: 250px;
  padding-left: 20px;

/* High contrast */
body.high-contrast {
  background-color: DarkBlue;
  color: yellow

body.high-contrast h1 {
  text-shadow: none;

/* Print */
body.print h1 {
  text-shadow: none;

body.print img {
  display: none;


                // Cross browser addEvent function by John Resig
function addEvent(obj, type, fn) {
  if (obj.attachEvent) {
    obj['e' + type + fn] = fn;
    obj[type + fn] = function() {
      obj['e' + type + fn](window.event);
    obj.attachEvent('on' + type, obj[type + fn]);
  } else obj.addEventListener(type, fn, false);

function switchStyles() {
  var selectedOption = this.options[this.selectedIndex],
    className = selectedOption.value;

  document.body.className = className;

var styleSwitcher = document.getElementById("styleSwitcher");
addEvent(styleSwitcher, "change", switchStyles);