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.


<h1>Accordion Element</h1>
    <summary>What is HTML?</summary>
    <p>HTML (HyperText Markup Language) is the most basic building block of the Web. It defines the meaning and structure of web content.</p>
    <summary>What is CSS?</summary>
    <p>Cascading Style Sheets (CSS) is a stylesheet language used to describe the presentation of a document written in HTML.</p>
    <summary>What is JavaScript?</summary>
    <p>JavaScript (JS) is a lightweight, interpreted, or just-in-time compiled programming language with first-class functions.</p>


                @import url(';400&display=swap');

:root {
  --white: rgba(254,255,250,1);
--gray: rgba(220,231,235,1);
--red: rgba(255,104,115,1);
--black: rgba(48,69,92,0.8);
--type: 'Open Sans', sans-serif;
html {
    width: 100%;
  height: 100%;
  background-color: var(--gray);
  font-family: var(--type);
  color: var(--black);

main {
   display: flex;
  flex-direction: column;
    margin: 10px auto 0 auto;
  box-shadow: 0 10px 0 0 var(--red) inset;
  background-color: var(--white);
  max-width: 500px;
  padding: 30px;
details summary::-webkit-details-marker {
details[open] > summary:before {
  transform: rotate(90deg);

summary:before {
  content: '';
  border-width: .4rem;
  border-style: solid;
  border-color: transparent transparent transparent #fff;
  position: absolute;
  top: 1.3rem;
  left: 1rem;
  transform: rotate(0);
  transform-origin: .2rem 50%;
  transition: .5s transform ease;
summary {
  position: relative;
  font-size: 26px;
  line-height: 34px;
  padding: 16px 0;
  font-weight: 400;
  letter-spacing: 1px;
  margin: 0;
  cursor: pointer;

p {
    color: var(--black);
  font-size: 17px;
  line-height: 26px;
  letter-spacing: 1px;
  margin-top: 14px;

h1  {
    color: var(--red);

h1 {
    text-transform: uppercase;
  font-size: 36px;
  line-height: 42px;
  letter-spacing: 3px;
  font-weight: 100;