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

              
                <head>
  <link rel="stylesheet" type="text/css" href=".css">
</head>
<body>
  <div id="header"><h1>This is a header</h1></div>
  <div id="nav">
    <ol>
      <h4>First Set of Navigation</h4>
      <li>This is the first item</li>
      <li>This is the second item</li>
      <li>This is the third item</li>
      <li>This is the fourth item</li>
    </ol>
    
    <ul>
      <h4>Second Set of Navigation</h4>
      <li>Random thing one</li>
      <li>Random thing two</li>
      <li>Random thing three</li>
      <li>Random thing four</li>
    <ul>
  </div>
  <div class="main"><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur tristique turpis mollis nibh aliquam rhoncus. Praesent dui tellus, vehicula a nunc non, tempus gravida lorem. Lorem ipsum dolor sit amet, consectetur adipiscing elit. In dapibus pretium ipsum, dictum tempus dolor fringilla ut. Aliquam pharetra rhoncus accumsan. Integer mollis pretium euismod. Nunc bibendum massa turpis, in sodales est ornare sit amet. Maecenas leo risus, ultricies id velit eget, gravida feugiat est. Mauris id elementum metus. Sed vel nibh in ex commodo rhoncus eu eu nunc. Mauris interdum tincidunt sem, a tincidunt felis scelerisque pellentesque. Etiam pulvinar lacinia ipsum, sed pellentesque orci laoreet ut. Aenean pellentesque sem nec orci euismod, et varius urna ultricies. Nullam maximus, ipsum sit amet consequat rhoncus, est quam placerat velit, a tempus lectus nibh eu est. Cras consectetur imperdiet magna, non ultricies leo sollicitudin sit amet. Suspendisse ullamcorper metus vitae porta rhoncus.</p></div>
      <div id="footer"><p>just some text</p></div>
<body>
              
            
!

CSS

              
                #header {
  display:block;
  background-color:blue;
  height:10%;
  width:100%;
  font-family:Arial;
  border:2px solid black;
  border-radius:15px;
  text-align:center;
}

#nav {
  height:100%;
  background-color:purple;
  width:30%;
  float:left;
  border:2px solid black;
  border-radius:15px;
}

.main {
  float:right;
  width:69%;
  height:80%;
  position:relative;
}

#footer {
  display:block;
  width:100%;
  height:10%;
  background:yellow;
  border:2px solid black;
  position:relative;
  clear:both;
  border-radius:15px;
  padding: 10px;
}
              
            
!

JS

              
                
              
            
!
999px

Console