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.


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.


                <div class="container">
  <!-- Site Name and Navigation Bar -->
  <nav><h1>Site Name and Navigation Bar</h1></nav>
  <!-- Main Content -->
  <div class="main">
      <h1>Main Content</h1>
      <p>The following <code>pre</code> element will have a horizontal scrollbar if it has lines that exceed its width.</p>
      <h2>Code Example</h2>
      <!-- Code Example -->
    &lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=edge&quot;&gt;
    &lt;meta charset=&quot;utf-8&quot;&gt;
    &lt;meta name=&quot;description&quot; content=&quot;This is simply an demonstration of HTML (which stands for HyperText Markup Language) document markup.&quot;&gt;
    &lt;meta name=&quot;author&quot; content=&quot;SitePoint&quot;&gt;
    &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1&quot;&gt;
  <!-- Sidebar -->
  <div class="sidebar">
      <p>This is the sidebar.</p>
      <!-- Some Useful Links -->
      <h2>Some Useful Links</h2>
        <li><a href="">SitePoint</a><li>
        <li><a href=""><code>pre</code> - SitePoint Reference</a></li>
         <li><a href=""><code>code</code> - SitePoint Reference</a></li>
        <li><a href=""> <code>pre</code> element W3C HTML5 specification</a></li>
        <li><a href=""><code>code</code> element W3C HTML5 specification</a></li>

<p class="p">Demo by Jacob Gube. <a href="">See article</a>.</p>


                @import url(|Roboto+Slab:700);
* { margin: 0; padding: 0; }

pre {
  overflow: auto;
  background-color: #ffffff;
  border: 1px solid #898989;
  padding: 5px;

nav {
  background: #e1e1e1;

.main {
  width: 60%;
  float: left;
  background: #c2c2c2;

.sidebar {
  width: 35%;
  float: right;
  background: #d7d7d7;

/* Basic Page Styles */
.container { width: 95%; max-width: 1000px; margin: 0 auto; }
.sidebar ul { list-style: none; padding-top:10px; }
.sidebar ul li { margin-bottom: 10px; }
nav, .main, .sidebar { padding: 5px; vertical-align: top; }
body { font: 14px/23px "Roboto", sans-serif; }
h1, h2 { font-family: 'Roboto Slab', serif; font-weight: 700; line-height: 1.8em; }
h1, h2, p, pre, ul { margin-bottom: 15px; }
h1 { font-size: 23px; }
h2 { font-size: 18px; color: #464646; }
@media only screen and (max-width: 640px) {
  nav, .main, .main article, .sidebar, .sidebar aside {
    width: 100%;
    display: block;
    float: none;
    padding: 0;
    padding-bottom: 10px;
  h1, h2, p, ul, pre {
    margin-left: 15px;
    margin-right: 15px;

.p {
  font-family: Arial, sans-erif;
  font-size: 14px;
  padding-top: 180px;
  clear: both;
  text-align: center;