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.



Go PRO Window blinds lowered to protect code. Code Editor with window blinds (raised) and a light blub turned on.

Keep it secret; keep it safe.

Private Pens are hidden everywhere on CodePen, except to you. You can still share them and other people can see them, they just can't find them through searching or browsing.

Upgrade to PRO


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.


Make Template?

Templates are Pens that can be used to start other Pens quickly from the create menu. The new Pen will copy all the code and settings from the template and make a new Pen (that is not a fork). You can view all of your templates, or learn more in the documentation.

Template URL

Any Pen can act as a template (even if you don't flip the toggle above) with a special URL you can use yourself or share with others. Here's this Pen's template URL:


Screenshot or Custom Thumbnail

Screenshots of Pens are shown in mobile browsers, RSS feeds, to users who chose images instead of iframes, and in social media sharing.

This Pen is using the default Screenshot, generated by CodePen. Upgrade to PRO to upload your own thumbnail that will be displayed on previews of this pen throughout the site and when sharing to social media.

Upgrade to PRO


                <div class="tabs">

  <input class="state" type="radio" title="Breakfast" name="state" id="breakfast" checked="">
  <input class="state" type="radio" title="Dinner" name="state" id="dinner">
  <input class="state" type="radio" title="Dessert" name="state" id="dessert">

  <div class="tab-links">
    <label for="breakfast" id="breakfast-tab" class="tab">Breakfast</label>
    <label for="dinner" id="dinner-tab" class="tab">Dinner</label>
    <label for="dessert" id="dessert-tab" class="tab">Dessert</label>

  <div class="panels">

    <div id="breakfast-panel" class="panel active">
      <img src="" alt="mountain" / align="left" alt="Gimme Bacon!">
      <p>Breakfast will be a exquisite pile of bacon served on a Thanksgisving platter. No eggs, no toast and no orange juice. Serves 1 person.

      <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in dui mauris. Vivamus hendrerit arcu sed erat molestie vehicula. Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor. Ut in nulla enim. Phasellus molestie magna non est bibendum non venenatis nisl tempor. Suspendisse dictum feugiat nisl ut dapibus. Mauris iaculis.</p>

    <div id="dinner-panel" class="panel">
      <p>Dinner will be graciously catered by Taco Bell. Get ready for a literal and figurative blast!</p>

    <div id="dessert-panel" class="panel">
      <li>A whole red velvet cake</li>
      <li>Rocky road ice cream</li>
      <li>Cotton candy (the multicolored kind)</li>
      <li>Krispy Kreme glaze donuts</li>
      <li>Coffee (no decaf allowed)</li>
      <li>A toothbrush</li>




                .tabs .panel img {
  margin: 0 15px;
  width: 25%;


/* Android 2.3 :checked fix */
@keyframes fix {
  from {
    opacity: 1;
  to {
    opactity: 1

body {
  animation: fix 1s infinite;

.tabs .state {
  display: none;

#breakfast:focus ~ .tabs #breakfast-tab,
#dinner:focus ~ .tabs #dinner-tab,
#dessert:focus ~ .tabs #dessert-tab {
  box-shadow: 0 0 3px 3px rgba(0,127,255,.5);

.tabs .tab {
  display: inline-block;
  padding: 10px;
  vertical-align: top;
  background-color: #eee;
  cursor: hand;
  cursor: pointer;

.tabs .tab:hover {
   background-color: #fff;

#breakfast:checked ~ .tab-links #breakfast-tab,
#dinner:checked ~ .tab-links #dinner-tab,
#dessert:checked ~ .tab-links #dessert-tab {
  background-color: #fff;
  border-bottom: 5px solid #fff;
  cursor: default;

.tabs .panels {
  background-color: #fff;
  padding: 20px;

.tabs .panel {
  display: block;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s linear;

#breakfast:checked ~ .panels #breakfast-panel,
#dinner:checked ~ .panels #dinner-panel,
#dessert:checked ~ .panels #dessert-panel {
  max-height: 1000px;

body {
  background-color: #ddd;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 1.25em;
  line-height: 1.5;
  padding: 20px;

p {
  margin-bottom: 15px;



What's a functional programmer's favorite animal? A lamb, duh!