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.

Details

Privacy

Go PRO Window blinds lowered to protect code. Code Editor with window blinds (raised) and a light blub turned on.

Keep it secret; keep it safe.

Private Pens are hidden everywhere on CodePen, except to you. You can still share them and other people can see them, they just can't find them through searching or browsing.

Upgrade to PRO

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.

Template

Make Template?

Templates are Pens that can be used to start other Pens quickly from the create menu. The new Pen will copy all the code and settings from the template and make a new Pen (that is not a fork). You can view all of your templates, or learn more in the documentation.

Template URL

Any Pen can act as a template (even if you don't flip the toggle above) with a special URL you can use yourself or share with others. Here's this Pen's template URL:

Screenshot

Screenshot or Custom Thumbnail

Screenshots of Pens are shown in mobile browsers, RSS feeds, to users who chose images instead of iframes, and in social media sharing.

This Pen is using the default Screenshot, generated by CodePen. Upgrade to PRO to upload your own thumbnail that will be displayed on previews of this pen throughout the site and when sharing to social media.

Upgrade to PRO

HTML

              
                <body><nav class="navbar navbar-expand-lg navbar-dark bg-dark mb-4"><div class="container"><button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span></button><div class="collapse navbar-collapse" id="navbarSupportedContent"><ul class="navbar-nav"><li class="nav-item"><a class="nav-link" href="/">All</a></li><li class="nav-item"><a class="nav-link" href="/xd/">XD</a></li><li class="nav-item"><a class="nav-link" href="/psd/">PSD</a></li><li class="nav-item"><a class="nav-link" href="/figma/">Figma</a></li><li class="nav-item"><a class="nav-link" href="/sketch/">Sketch</a></li></ul></div></div></nav><div class="container"><div class="row"><div class="col-lg-8 ml-auto"><div class="jumbotron"><div class="card mb-3"><img class="card-img-top" src="https://www.xdguru.com/wp-content/uploads/2019/07/Discover-travel-app-XD-template-1014x487.jpg"><div class="card-body mx-3 mx-lg-3"><div class="text-right mt-2 mb-4 mt-md-3 mb-md-5"><a href="http://localhost:5656/tags/xd/" class="badge badge-light">xd</a>
<a href="http://localhost:5656/tags/mobile/" class="badge badge-light">mobile</a>
<a href="http://localhost:5656/tags/discover/" class="badge badge-light">discover</a>
<a href="http://localhost:5656/tags/tokyo/" class="badge badge-light">tokyo</a></div><h1 class="card-title h2">Descover app</h1><p class="card-text pb-3 mt-4">It’s an inspiring travel app mobile template, very well designed and free to download!</p><p class="text-dark mt-4 mb-0 font-weight-light">Author: <a class="text-dark text-decoration-none font-weight-normal" href="https://dribbble.com/thedesigner1921" target="_blank">thedesigner1921 . as™</a></p><p class="text-dark mt-0 pt-0 font-weight-light">License: <span class="text-dark">N/A</span></p><div class="border-top text-center mt-5"><a class="btn btn-lg btn-light font-weight-bold text-muted my-5" href="https://u.teknik.io/1HWuV.zip">Download</a></div></div></div></div></div><div class="col-lg-3 mr-auto"><div class="card mb-4"><h5 class="card-header">Categories:</h5><div class="card-body"><ul class="list-group list-group-flush"><li class="list-group-item"><a class="text-dark text-decoration-none font-weight-bold" href="http://localhost:5656/categories/mobile/">Mobile</a></li><li class="list-group-item"><a class="text-dark text-decoration-none font-weight-bold" href="http://localhost:5656/categories/website/">Website</a></li></ul></div></div><div class="card mb-4"><h5 class="card-header">Tags:</h5><div class="card-body"><a href="http://localhost:5656/tags/discover/" class="badge badge-pill badge-light">discover</a>
<a href="http://localhost:5656/tags/mobile/" class="badge badge-pill badge-light">mobile</a>
<a href="http://localhost:5656/tags/prototype/" class="badge badge-pill badge-light">prototype</a>
<a href="http://localhost:5656/tags/tokyo/" class="badge badge-pill badge-light">tokyo</a>
<a href="http://localhost:5656/tags/uploader/" class="badge badge-pill badge-light">uploader</a>
<a href="http://localhost:5656/tags/web/" class="badge badge-pill badge-light">web</a>
<a href="http://localhost:5656/tags/website/" class="badge badge-pill badge-light">website</a>
<a href="http://localhost:5656/tags/xd/" class="badge badge-pill badge-light">xd</a></div></div></div></div></div><footer class="py-4 bg-dark"><div class="container"><p class="m-0 text-center text-white text-muted">© 2019. Awesome Design</p></div></footer><script src="http://localhost:5656/js/jquery-3.3.1.slim.min.js"></script><script src="http://localhost:5656/js/popper.min.js"></script><script src="http://localhost:5656/js/bootstrap.min.js"></script><script data-no-instant="">document.write('<script src="/livereload.js?port=5656&mindelay=10"></'+'script>')</script><script src="/livereload.js?port=5656&amp;mindelay=10"></script></body>
              
            
!

CSS

              
                
              
            
!

JS

              
                
              
            
!
999px
How would you React if I said I love Vue?

Console