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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

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



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


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.


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


                <p>When on Leaflet Page this code gets generated, so you can tie into class of ".current-menu-item" for active menu items.</p>
<div class="menu-mainmenu-container"><ul id="menu-mainmenu" class="menu"><li id="menu-item-48" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-home menu-item-48"><a href="http://localhost/wordpress/">Home</a></li>
<li id="menu-item-49" class="menu-item menu-item-type-post_type menu-item-object-page  page_item page-item-34 menu-item-49"><a href="http://localhost/wordpress/about/">About</a></li>
<li id="menu-item-52" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-52"><a href="http://localhost/wordpress/projects/">Projects</a>
<ul class="sub-menu">
	<li id="menu-item-53" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-53"><a href="http://localhost/wordpress/projects/feel-good-candy/">Feel Good Candy</a></li>
	<li id="menu-item-54" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-54 current-menu-item current_page_item"><a href="http://localhost/wordpress/projects/leaflet/">Leaflet</a></li>
<li id="menu-item-51" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-51"><a href="http://localhost/wordpress/forums/">Forums</a></li>
<li id="menu-item-55" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-55"><a href="http://localhost/wordpress/shop/">Shop</a></li>
<li id="menu-item-50" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-50"><a href="http://localhost/wordpress/contact/">Contact</a></li>


                /*  much easier to style menu like this, since your menu is global you don't need to target each individual item   */
.menu-mainmenu-container {}
.menu-mainmenu-container ul {}
.menu-mainmenu-container ul li {}
.menu-mainmenu-container ul li a {}
.menu-mainmenu-container ul li a:visited {}
.menu-mainmenu-container ul li a:hover {text-transform:uppercase;}
.menu-mainmenu-container ul li a:active {}
.menu-mainmenu-container ul li ul {}
.menu-mainmenu-container ul li ul li {}
/* Much cleaner than this >>>>
ul#main-navigation li a:hover, 
body.home ul#main-navigation li.header-home a, 
body.about ul#main-navigation li.header-about a, 
body.projects ul#main-navigation li.header-projects a, 
body.bbPress ul#main-navigation li.header-forums a, ul#main-navigation li.header-shop a, ul#main-navigation li.header-contact a, 
bod.default ul#main-navigation li.header-home a, 
body.feelgoodcandy ul#main-navigation li.header-projects a, 
body.leaflet ul#main-navigation li.header-projects a, 
body.feelgoodcandy ul#main-navigation li.header-feelgoodcandy a, 
body.leaflet ul#main-navigation li.header-leaflet a {
	color: #FFFEF2;}

then just apply class for active item */
.current-menu-item {
/* wordpress will generate this class on appropriate menu item"


A Pen is worth a thousand docs.