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

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

              
                <div class="browser-template">
    <div class="browser-template__top-bar">
        <ul class="browser-template__buttons">
            <li class="browser-template__buttons_item"></li>
            <li class="browser-template__buttons_item"></li>
            <li class="browser-template__buttons_item"></li>
        </ul>
        
        <div class="browser-template__address">
            <svg xmlns="http://www.w3.org/2000/svg"
             viewBox="0 0 448 512">
            <path d="M144 144v48h160v-48c0-44.2-35.8-80-80-80s-80 35.8-80 80zm-64 48v-48C80 64.5 144.5 0 224 0s144 64.5 144 144v48h16c35.3 0 64 28.7 64 64v192c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V256c0-35.3 28.7-64 64-64h16z" />
                            </svg>
                            dailydevlinks.com
        </div>
        
        <ul class="browser-template__controls">
            <li class="browser-template__controls_item">
                <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M229.9 473.899l19.799-19.799c4.686-4.686 4.686-12.284 0-16.971L94.569 282H436c6.627 0 12-5.373 12-12v-28c0-6.627-5.373-12-12-12H94.569l155.13-155.13c4.686-4.686 4.686-12.284 0-16.971L229.9 38.101c-4.686-4.686-12.284-4.686-16.971 0L3.515 247.515c-4.686 4.686-4.686 12.284 0 16.971L212.929 473.9c4.686 4.686 12.284 4.686 16.971-.001z"/></svg>
            </li>
            <li class="browser-template__controls_item">
                <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M218.101 38.101L198.302 57.9c-4.686 4.686-4.686 12.284 0 16.971L353.432 230H12c-6.627 0-12 5.373-12 12v28c0 6.627 5.373 12 12 12h341.432l-155.13 155.13c-4.686 4.686-4.686 12.284 0 16.971l19.799 19.799c4.686 4.686 12.284 4.686 16.971 0l209.414-209.414c4.686-4.686 4.686-12.284 0-16.971L235.071 38.101c-4.686-4.687-12.284-4.687-16.97 0z"/></svg>
            </li>
            <li class="browser-template__controls_item">
                <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M483.515 28.485L431.35 80.65C386.475 35.767 324.485 8 256.001 8 119.34 8 7.9 119.525 8 256.185 8.1 393.067 119.095 504 256 504c63.926 0 122.202-24.187 166.178-63.908 5.113-4.618 5.353-12.561.482-17.433l-19.738-19.738c-4.498-4.498-11.753-4.785-16.501-.552C351.787 433.246 306.105 452 256 452c-108.321 0-196-87.662-196-196 0-108.321 87.662-196 196-196 54.163 0 103.157 21.923 138.614 57.386l-54.128 54.129c-7.56 7.56-2.206 20.485 8.485 20.485H492c6.627 0 12-5.373 12-12V36.971c0-10.691-12.926-16.045-20.485-8.486z"/></svg>
            </li>
        </ul>
    </div>
    
    <iframe 
        src="https://dailydevlinks.com/" 
        width="100%"
        height="100%"
        frameborder="0">
    </iframe>
</div>
              
            
!

CSS

              
                $template-color: #dedede;
$red:     #FF3737;
$yellow:  #FFCE00;
$green:   #32d74b;

.browser-template {
    overflow: hidden;
    border: 2px solid $template-color;
    border-top: none;
    border-radius: 8px;
    box-shadow: 0 4px 10px 1px rgba(darken($template-color, 50%), 0.05);

    &__top-bar {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        padding: 7px 10px;
        background: $template-color;
    }

    &__buttons {
        display: flex;
        margin: 0;

        &_item {
            width: 10px;
            height: 10px;
            margin-top: 0;
            margin-left: 5px;
            list-style: none;
            border-radius: 100px;
            background: darken($template-color, 10%);

            &:first-child {
                margin-left: 0;
                background-color: $red;
            }

            &:nth-child(2) {
                background-color: $yellow;
            }

            &:nth-child(3) {
                background-color: $green;
            }
        }
    }

    &__address {
        flex-basis: 0;
        flex-grow: 1;
        max-width: 100%;
        height: 23px;
        margin: 0 15px;
        border-radius: 4px;
        background: lighten($template-color, 10%);
        box-shadow: 0 1px 2px 0 rgba(darken($template-color, 50%), 0.05);
        color: darken($template-color, 80%);
        font-size: 12px;
        line-height: 23px;
        text-align: center;

        svg {
            display: inline;
            height: 0.7em;
            margin-right: 1px;
            opacity: 0.8;
            color: darken($green, 10%);
            fill: currentColor;
        }
    }

    &__controls {
        display: flex;
        margin: 0;

        &_item {
            width: 12px;
            height: 12px;
            margin-top: 0;
            margin-left: 10px;
            list-style: none;
            color: darken($template-color, 15%);

            &:first-child {
                margin-left: 0;
            }
        }
    }
}



// Demo
body {
    padding: 15px;
    background: #F7F8FB;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

.browser-template {
    margin: 0 auto;
    max-width: 1200px;
    height: 95vh;
}

iframe {
    height: calc(100% - 45px);
}
              
            
!

JS

              
                
              
            
!
999px

Console