Pen Settings

HTML

CSS

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

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

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.

HTML

              
                <section class="faq">
    <details>
        <summary>What is Lorem Ipsum?</summary>
        <p>Come, Comrade Bender! We must take to the streets! One hundred dollars. This is the worst kind of discrimination: the kind against me! Look, everyone wants to be like Germany, but do we really have the pure strength of 'will'? Who said that? SURE
            you can die! You want to die?! Son, as your lawyer, I declare y'all are in a 12-piece bucket o' trouble. But I done struck you a deal: Five hours of community service cleanin' up that ol' mess you caused.</p>
    </details>
    <details>
        <summary>Why do we use it?</summary>
        <p>Come, Comrade Bender! We must take to the streets! One hundred dollars. This is the worst kind of discrimination: the kind against me! Look, everyone wants to be like Germany, but do we really have the pure strength of 'will'? Who said that? SURE
            you can die! You want to die?! Son, as your lawyer, I declare y'all are in a 12-piece bucket o' trouble. But I done struck you a deal: Five hours of community service cleanin' up that ol' mess you caused.</p>
    </details>
    <details>
        <summary>Where does it come from?</summary>
        <p>Come, Comrade Bender! We must take to the streets! One hundred dollars. This is the worst kind of discrimination: the kind against me! Look, everyone wants to be like Germany, but do we really have the pure strength of 'will'? Who said that? SURE
            you can die! You want to die?! Son, as your lawyer, I declare y'all are in a 12-piece bucket o' trouble. But I done struck you a deal: Five hours of community service cleanin' up that ol' mess you caused.</p>
    </details>
    <details>
        <summary>Where can I get some?</summary>
        <p>Come, Comrade Bender! We must take to the streets! One hundred dollars. This is the worst kind of discrimination: the kind against me! Look, everyone wants to be like Germany, but do we really have the pure strength of 'will'? Who said that? SURE
            you can die! You want to die?! Son, as your lawyer, I declare y'all are in a 12-piece bucket o' trouble. But I done struck you a deal: Five hours of community service cleanin' up that ol' mess you caused.</p>
    </details>
</section>
              
            
!

CSS

              
                /* Get rid of the triangle */
details > summary {
    list-style: none;    
    cursor: pointer; /* Give some hint, it is clickable. */
}

details > summary::-webkit-details-marker {
    display: none;
}

/* Replace the triangle with some generated content. */
details > summary::before {
    content: '\2753'; /* Heavy question mark entity */
    display: inline-block;
    width: 0.5rem;
    margin-right: 0.25rem;
background-color: #fff;
}

/* Improve look */
details > summary {
    display: inline-block; /* More predictable active area for clicking. */
    font-weight: bold;
}

/* Selector to style opened/expanded state. */
details[open] > summary {
    color: rebeccapurple;
}

/* Improve spacing */
details {
    margin-bottom: 0.5rem;
}

details p {
    margin-left: 0.75rem;
    margin-top: 0.25rem;
}
              
            
!

JS

              
                
              
            
!
999px

Console