Pen Settings

HTML

CSS

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

JavaScript

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

Packages

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.

Behavior

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.

HTML

              
                <!--* first accordion example -->
<section class="accordion-examples">
  <h2 class="accordion-examples__heading">Accordion 1</h2>

  <div class="accordion1-wrapper">
    <!-- first accordion -->
    <details class="accordion1-card">
      <summary class="accordion1-card__header">Header 1</summary>
      <p class="accordion1-card__body">
        Lorem ipsum, dolor sit amet consectetur adipisicing elit. Et
        neque, velit quasi quos quia nulla omnis! Similique dolorum,
        veniam facilis aliquam est fuga aperiam voluptatibus, sapiente
        atque vitae quia accusamus.
      </p>
    </details>

    <!-- second accordion -->
    <details class="accordion1-card">
      <summary class="accordion1-card__header">Header 2</summary>
      <p class="accordion1-card__body">
        Lorem ipsum, dolor sit amet consectetur adipisicing elit. Et
        neque, velit quasi quos quia nulla omnis! Similique dolorum,
        veniam facilis aliquam est fuga aperiam voluptatibus, sapiente
        atque vitae quia accusamus.
      </p>
    </details>

    <!-- third accordion -->
    <details class="accordion1-card">
      <summary class="accordion1-card__header">Header 3</summary>
      <p class="accordion1-card__body">
        Lorem ipsum, dolor sit amet consectetur adipisicing elit. Et
        neque, velit quasi quos quia nulla omnis! Similique dolorum,
        veniam facilis aliquam est fuga aperiam voluptatibus, sapiente
        atque vitae quia accusamus.
      </p>
    </details>
  </div>
</section>
              
            
!

CSS

              
                /* ! project styles */
.accordion-examples__heading {
  text-align: center;
}
/* accordion wrapper */
.accordion1-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* accordion card */
.accordion1-card {
  width: 280px;
  border: double goldenrod;
  background-color: white;
}

/* accordion title */
.accordion1-card__header {
  font-weight: bold;
  color: #202020;
  position: relative;
  padding: 10px;
  margin-bottom: 0;
}

/* accordion body */
.accordion1-card__body {
  border-top: solid 1px goldenrod;
  padding: 10px;
  color: #3d3b3b;
}

              
            
!

JS

              
                
              
            
!
999px

Console