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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

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


                <div class="wrapper">

    <h1 class="heading">HTML Buddies</h1>

    <h2 class="sub-heading">CodePen Challenge - May 2018</h2>


        <div class="desc-item">

            <dt class="desc-term">&lt;del&gt; &amp; &lt;ins&gt;</dt>

            <dd class="desc-details">Indicates content has been removed or added</dd>


        <div class="desc-item">

            <dt class="desc-term">&lt;details&gt; &amp; &lt;summary&gt;</dt>

            <dd class="desc-details">Enables content to be shown or hidden</dd>


        <div class="desc-item">

            <dt class="desc-term">&lt;sub&gt; &amp; &lt;sup&gt;</dt>

            <dd class="desc-details">Defines subscript and superscript text</dd>


        <div class="desc-item">

            <dt class="desc-term">&lt;dt&gt; &amp; &lt;dd&gt;</dt>

            <dd class="desc-details">Pairs a term with a corresponding description</dd>





                * {
    box-sizing: border-box;

body {
    display: flex;
    min-height: 100vh;
    font-family: "Raleway", Arial, sans-serif;
    font-weight: 700;
    color: #fafafa;
    background-color: #333745;
    padding: 50px 20px;
    text-align: center;

.wrapper {
    max-width: 100%;
    margin: auto;

.heading {
    font-size: 60px;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);

.sub-heading {
    font-size: 35px;
    line-height: 1.4;
    color: #c2d0bd;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
    margin: 10px 0 30px;

.desc-item {
    position: relative;
    margin: 0 auto 25px;
    border-radius: 10px;
    border: 3px solid #777;
    box-shadow: 0 0 1px 2px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    overflow: hidden;

.desc-item:last-of-type {
    margin-bottom: 0;

.desc-details {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 35px 50px;

.open .desc-term {
    transform: translateY(-100%);

.desc-term {
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    font-size: 38px;
    line-height: 1.2;
    color: #f1f1f1;
    background-color: #111;
    transition: transform 300ms ease-out;

.desc-details {
    height: 100%;
    font-size: calc(20px + 0.5vw);
    font-weight: 400;
    line-height: 1.5;
    color: #1a1a1a;
    background-color: #fff;
    box-shadow: 0 0 4px 2px rgba(0, 0, 0, 0.7) inset;



                window.addEventListener("DOMContentLoaded",	() => {

    const descItems = document.querySelectorAll('.desc-item');

    descItems.forEach(item => item.addEventListener('click', () => item.classList.toggle('open')));