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

+ 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.


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.


                <main lang="en">
  <h1>CodePen Home
    WebAIM Million 2021 - What Devs need to know (Code examples)</h1>
  <h2>Low contrast text</h2>
  <button id="badColour">This contrast sucks!</button>
  <h2>Missing alternative text for images</h2>
  <img alt="A building in Kolkata" src="*MuiR77p9gmntMbdYUCNcWQ.jpeg">
  <h2>Missing form input labels</h2>
  <h4>Assigned label:</h4>
  <label for="fname">First name:</label><input type="text" id="fname">
  <h4>Nested label:</h4>
  <label>First Name:<input type="text"></label>
  <span id="fname">First Name:</span><input type="text" aria-labelledby="fname">
  <h3>Special cases:</h3>
  <h4>Aria-label (replaces label for screen readers and is not visible):</h4>
  <input type="button" value="X" aria-label="close window">
  <h2>Empty Links</h2>
  <a href=""><i class="fab fa-twitter fa-9x"></i> <span class="sr-only">The A11y Coder Twitter page</span></a>
  <h2>Missing document language</h2>
  <p class="italic">Inspect the &#60;main&#62; element of this page to see the lang attribute in action</p>
  <h2>Empty Buttons</h2>
  <p>Note: this button does nothing</p>
  <button><img src="*ViAdGpX13GVYtRFTYUaivQ.png" alt="the a11y coder"></button>


                #badColour {
  color: #ff0000;
  background-color: #0000E0;
  font-size: 16px;
  font-weight: bold;