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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

              
                <div class="card">
 <header>
  <span class="card-title">
   Marilyn Monroe
  </span>
 </header>
 <p class="card-text">I believe that everything happens for a reason. People change so that you can learn to let go, things go wrong so that you appreciate them when they're right, you believe lies so you eventually learn to trust no one but yourself, and sometimes good things fall apart so better things can fall together.</p>
</div>

<div class="sheet">
 <div class="l-margin margin">
  <div class="hole first-hole"></div>
  <div class="hole second-hole"></div>
  <div class="hole third-hole"></div>
 </div>
 <div class="r-margin margin"></div>
 <header>
  <span class="sheet-title">
   Marilyn Monroe
  </span>
 </header>
 <p class="sheet-text">I believe that everything happens for a reason. People change so that you can learn to let go, things go wrong so that you appreciate them when they're right, you believe lies so you eventually learn to trust no one but yourself, and sometimes good things fall apart so better things can fall together.</p>
</div>
              
            
!

CSS

              
                body {
 background-color: #555;
 display: flex;
 justify-content: center;
 flex-wrap: wrap;
}

/* generic styling for the quote */
#text::before {
 content: "\"";
}
#text::after {
 content: "\"";
}
#title::after {
 content: " said:";
 font-size: 20px;
}

/* Styling specific to an index card */
.card{
 font-family: Courier, monospace;
 background-color: white;
 background: repeating-linear-gradient(white, white 25px, #9198e5 26px, #9198e5 27px);
 background-position-y: 34px;
 height: 300px;
 width: 500px;
 padding: 0;
 margin-top: 50px;
 
 margin-right: 15px;
}
.card header {
 background: linear-gradient(white, white 33px, pink 35px, pink 36px);
 height: 36px;
}
.card-title {
 position: relative;
 left: 10px;
 top: 8px;
 font-size: 30px;
 font-weight: bold;
}
.card-text {
 position: relative;
 top: 30px;
 font-size: 18px;
 margin: 0 20px;
 line-height: 27px;
}

/* Styling specific to a sheet of lined paper */
.sheet{
 font-family: 'Indie Flower', cursive;
 background-color: white;
 background: repeating-linear-gradient(white, white 25px, #9198e5 26px, #9198e5 27px);
 background-position-y: 49px;
 height: 550px;
 width: 450px;
 padding: 0;
 margin-top: 50px;
 
 margin-left: 15px;
}
.sheet header {
 background-color: white;
 background: linear-gradient(white, white 48px, #9198e5 49px, #9198e5 50px);
 height: 50px;
}
.sheet-title {
 position: relative;
 top: 20px;
 font-size: 30px;
 font-weight: bold;
 padding-left: 10px;
}
.sheet-text {
 position: relative;
 top: 33px;
 font-size: 22px;
 width: 480px;
 margin: 0 55px;
 line-height: 27px;
}
.margin {
 width: 49px;
 height: 100%;
}
.l-margin {
 float: left;
 border-right: 2px solid pink;
}
.r-margin {
 float: right;
 border-left: 1px solid pink;
}

/* Styling for hole punches */
.l-margin {
 position: relative;
}
.hole {
 height: 20px;
 width: 20px;
 background-color: #555;
 border-radius: 50%;
 position: absolute;
 left: 15px;
}
.first-hole {
 top: 30px;
}
.second-hole {
 top: 50%;
}
.third-hole {
 bottom: 30px;
}
              
            
!

JS

              
                
              
            
!
999px

Console