Pen Settings

HTML

CSS

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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ 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

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.

HTML

              
                <h1 class="first">Try to print this!</h1>
<p>Does't work? Strange text on your paper? <a href="https://codepen.io/MoritzGiessmann/pen/bpJLi">Here's why. (Code)</a></p>
<p><strong>Brought to you by:</strong><br>
<a href="https://twitter.com/moritzgiessmann">@MoritzGiessmann</a><br>
<a href="http://moritz-giessmann.de">moritz-giessmann.de</a>
</p>

              
            
!

CSS

              
                /**
 * This may be useful for preventing people trying to print the internet *hrhr*
 * Put this piece of CSS into your @media 'all' or 'print' CSS and no 
 * one will ever print your website again :D
 * 
 * @author: @MoritzGiessmann, http://moritz-giessmann.de
 */

@media print {
  body * {
		display: none!important;
	}

	body:before {
		content:'One does not simply print the internet!'!important;
		font-size:100px!important;
		color:#900!important;
	}
}

/* Not needed for making the internet printers going insane */
body {
  padding:0em 5em 5em 5em;
}

.first {
  color:#900;
  font-size:100px;
}

/* Some styles to make it look nice ;) */
@import url(https://fonts.googleapis.com/css?family=PT+Sans);
body {
  background:url(http://subtlepatterns.subtlepatterns.netdna-cdn.com/patterns/grid.png);
  font-family:"PT Sans";
  font-size:1.2em;
  color:#222;
}
              
            
!

JS

              
                
              
            
!
999px

Console