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.


                <ul id="myImageList" class="slideshow">
    <img alt="High brown fritillary (Argynnis adippe) on a brown knapweed (Centaurea jacea) flower" src="">
    <img alt="U500 Donbas - Amur class floating workshop (Project 304), now command ship. Navy of Ukraine. Sevastopol Bay." src="">
    <img alt="The church of Saint Metropolitan Peter in Pereslavl, Russia. Roof view from inside." src="">


                .slideshow {
  list-style-type: none;
  padding: 0;
  margin: 0;

img {
  width: 300px;


                var myImageList = document.getElementById('myImageList');

var slideshow = function(imageList) {
  var count = imageList.children.length;
  var current = 0;
  var ONE_SECOND = 1000;
  var i;
  var nextSlide;
  for (i = 1; i < count; i++) {
    imageList.children[i].style.display = 'none';
  nextSlide = function() {
    var next;
    if (current + 1 > count - 1) {
      next = 0;
    } else {
      next = current + 1;
    imageList.children[current].style.display = 'none';
    imageList.children[next].style.display = 'block';
    current = next;
  window.setInterval(nextSlide, ONE_SECOND);