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

              
                <link href='https://fonts.googleapis.com/css?family=Source+Sans+Pro:200,400' rel='stylesheet' type='text/css'>

<div class="box">
 <article class="card">
   <div class="card__corner">
      <div class="card__corner-triangle"></div>
   </div>
   <h1>URAWSM</h1>
   <p>GitHub Atom IDE Vanilla JavaScript Emmett WordPress Markdown BitBucket Private Repos are FREE! LESS or SCSS Grunt vs Gulp — csstricks.com is awesome. Laura Ipsum is mad funny box-sizing: border-box; FTW! I still don't know Ruby or Rails. Is that bad?</p>
 </article>

</div>
              
            
!

CSS

              
                * {
  box-sizing: border-box;
}

body { 
  background:#f1f2f2;
  font-family: 'Source Sans Pro', sans-serif;
  font-size:18px;
  line-height:1.5;
}

.box {
  background:#fff;
  box-shadow:0 1px 0 rgba(0,0,0,.2);
  margin:2em auto;
  padding:1em;
  position:relative;
  width:33%;
}
/* lil box*/

.card .card__corner {
position: absolute;
top: 0;
right: 0;
width: 2em;
height: 2em;
background-color: #e6e7e8;
}

.card .card__corner .card__corner-triangle {
position: absolute;
width: 0;
height: 0;
border-style: solid;
border-width: 0 2em 2em 0;
border-color: transparent #f1f2f2 transparent transparent;
}

h1 {
  box-shadow:0 1px 0 rgba(0,0,0,.2);
  font-size:3em;
  font-weight:200;
  word-break: break-word;
  margin:0;
  padding:0;
  text-align:center;
}

p {
  color:#666;
  font-weight:200;
  text-align:center;
}
              
            
!

JS

              
                // CSS folded corner from CodeAcademy's new site. 
// It looked cool so I hacked it to figure out how it works
// http://www.codecademy.com/learn
              
            
!
999px

Console