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.


                <ul id="top-menu">
  <li class="text-size">             
    <a class="size10" href="#small">Small Text</a>
    <a class="size12" href="#medium">Medium Text</a>
    <a class="size18" href="#large">Large Text</a>

  <li class="contrast">
      <a class="normalcontrast" href="#normal">Normal</a>
      <a class="highcontrast" href="#highcontrast">Highcontrast</a>

<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis ornare ligula in leo rutrum ultricies sed vel nulla. Donec cursus convallis fermentum. Sed vel ipsum sed nunc tincidunt hendrerit.</p>


body {font-size: 1.2em;}

a {
  padding-right: 10px;
} {color:#666;}

body.highcontrast {
  background: #000;

body.highcontrast a {color:#fff;}
body.highcontrast {color:#FF0000;}


                if(typeof(Storage)!=="undefined") {
    // Text resizing
    jQuery(".text-size a").click(function(){
        var fontSize = jQuery(this).attr("class").split("size")[1];

        jQuery("body").css("font-size", fontSize + "px");
        jQuery(".text-size a").not(this).removeClass("active");

        localStorage.setItem("font_size", fontSize);

    // Highcontrast
    jQuery(".contrast a").click(function(){
        var contrast = jQuery(this).attr("class");

        jQuery("body").attr("class", contrast);
        jQuery(".contrast a").not(this).removeClass("active");

        localStorage.setItem("contrast", contrast);

    window.onload = function() {
        var fontSize = localStorage.getItem("font_size");
        var contrast = localStorage.getItem("contrast");

        if (fontSize  != undefined || fontSize  != null) {
            jQuery("body").css("font-size", fontSize + "px");
            jQuery(".text-size a.size" + fontSize).addClass("active");  
        if (contrast  != undefined || contrast  != null) {
            jQuery("body").attr("class", contrast);
            jQuery(".contrast a." + contrast).addClass("active");
else {