Pen Settings



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


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.


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.


  <article id="article1">
    <img src="" alt="Photograph of a slice of cheesecake on a plate">
        <li>⅔ cup all-purpose flour
        <li>2 tbsp. sugar
        <li>2 tbsp. butter
        <li>1 tbsp. cold water
         <li>4 cups fat-free cottage cheese
         <li>1½ tbsp. sugar
         <li>¼ cup all-purpose flour
    <button class="print">Print recipe</button>
<article id="article2">
  <img src="" alt="Photograph of a stack of zucchini brownies on a plate">
  <h1>Zucchini Brownies</h1>
      <li>2 eggs
      <li>1 tbsp. vanilla
      <li>¾ cup brown sugar
      <li>¼ cup unsweetened applesauce
      <li>2 cups shredded zucchini
      <li>1 cup whole wheat flour
      <li>½ cup dark cocoa powder
      <li>¼ tsp. salt
      <li>1 cup carob chips
<button class="print">Print recipe</button>


                @font-face {
font-family: 'Edel Sans';
src: url('') format('opentype'), url('')format('woff');
font-weight: normal;
font-style: normal;
main { 
  display: flex;
  font-family: Edel Sans, Avenir, Arial, sans-serif; 
  margin: 0 auto;
  justify-content: center;
  max-width: 80%; 
article {
  margin: 0;
  position: relative;
  padding-bottom: 2rem; 
article img { width: 100%; height: auto; }
article h1 { line-height: 1.4; text-align: center; }
article h2 { 
  font-size: 1.4rem;
  border-bottom: 2px solid rgb(133,183,174);
  margin: 1rem auto;
  padding: .3rem; width: 8rem;
  text-align: center; font-weight: 200; 
article h3, article ul { margin-left: 1rem; }
article ul, article ol { 
  font-size: 1.2rem; line-height: 1.6; 
article ul, article ol { padding-left: 0; }
article ol { padding-left: 1rem; }
article ul { list-style-type: none;  }
article button:last-of-type { 
  position: absolute;
  bottom: 0; right: 1rem;
  padding: .5rem; 

@media screen and (max-width: 600px) {
	article:last-of-type { display: none; }
	article:first-of-type { width: 100%; }
@media print { 
	article button:last-of-type { display: none; }


                function removePrintStyles() {
	previousExclusions = document.getElementById("printexclusions");
	if (previousExclusions) previousExclusions.parentNode.removeChild(previousExclusions);

function printSection() {
	var css = document.createElement("style"),
	parentArticle = this.parentNode,
	articles = document.getElementsByTagName("article") = "printexclusions";
	css.innerHTML += "@media print {\n"
	for (var i = 0; i < articles.length; i++) {
		if (articles[i] !== parentArticle) { css.innerHTML += "#"+articles[i].id + "{ display: none; }\n"; }
	css.innerHTML += "}\n" 
var printRequestors = document.querySelectorAll("article button:last-of-type");
for (var i = 0; i < printRequestors.length; i++) {
	printRequestors[i].addEventListener("click", printSection, false);