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

              
                <main>
  <div class="wrapper"> <!-- block added to differentiate box margin space with dashed border -->
    <div class="box">
      <div class="content"> <!-- block added to differentiate box padding space with dashed border -->
        <h1>Content Goes Here</h1> <!-- Heading -->
      </div>
    </div>
  </div>
</main>
              
            
!

CSS

              
                /* Play With Box Settings */

.box {
  width: 300px;  /* content width */
  height: 50px;  /* content height */
  padding: 20px;  /* space between content and border */
  margin: 20px;  /* space between border and other elements */
  border-width: 20px;  /* border thickness */
 
  border-style:solid;
  border-radius:0px; /* round corners */
  background-color:#F4F4F4; /* try red, orange, ... */
}

.box:hover {
  border-width:30px; /* border thickness */
  border-color:#29AAE1;
  background-color:white; /* try red, orange, ... */
}

/* Play with Font and Text Settings */

h1 {
  text-align:center; /* left, right, center */
  color:black; /* try pink, red, yellow,. . . */
  font-size:24px; 
	font-style:italic; /* normal, italic */
	font-weight:lighter; /* bolder, bold, lighter, normal */
}

/* Other Style Settings */

body {
	width:100%;
	height:100%;
	position:absolute;
	left:0;
	top:0;
	display:table;
}

main {
	display:table-cell;
	vertical-align:middle;
	text-align:center;
}

.wrapper {
	width:auto;
	display:inline-block;
	border:1px dashed black;
  cursor:pointer;
}

.content {
  display:table;
  width:100%;
  height:100%;
  border:1px dashed black;
}

h1 {
  display:table-cell;
  vertical-align:middle;
  text-align:center;
}

* { /* antimated trantitions for all elements */
  -webkit-transition:0.5s; /* For Safari 3.1 to 6.0 */
  transition:0.5s; 
}



              
            
!

JS

              
                
              
            
!
999px

Console