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

              
                <div class="book">
  <section class="chapter">
    <h1>Chicharrones craft beer</h1>
    <p>Kickstarter sustainable helvetica, intelligentsia food truck viral lo-fi lumbersexual stumptown art party. Cold-pressed pinterest distillery kinfolk, plaid direct trade man bun health goth freegan selvage jean shorts bespoke.</p>
    
    <section class="subchapter">
      <h2>Tumblr stumptown</h2>
      <p>Paleo disrupt fixie schlitz, leggings jean shorts polaroid XOXO ennui meggings church-key chillwave cardigan readymade master cleanse. Deep v sustainable whatever keffiyeh +1. Shoreditch tacos food truck vegan viral, umami thundercats mixtape truffaut bitters cred man braid cray twee humblebrag. </p>
    </section>
    
    <section class="subchapter">
      <h2>Put a bird on it</h2>
      <p>Farm-to-table heirloom migas asymmetrical hashtag, celiac chambray trust fund tote bag. Single-origin coffee celiac lumbersexual squid tousled, man bun blog iPhone. Humblebrag photo booth meditation vice pork belly, paleo retro biodiesel yuccie heirloom echo park mixtape. Distillery cornhole migas ethical, cred viral hammock.</p>
    </section>
    
    <section class="subchapter">
      <h2>Kickstarter roof</h2>
      <p>Tofu chambray knausgaard 90's freegan gastropub lo-fi kitsch. PBR&B next level pork belly, stumptown affogato seitan thundercats neutra tote bag literally. Keffiyeh mlkshk asymmetrical leggings, offal kickstarter tacos.</p>
    </section>
  </section>
  
  <section class="chapter">
    <h1>Party tilde</h1>
    <p>Etsy vice shoreditch synth, aesthetic food truck kinfolk chicharrones gochujang pug swag. Brooklyn paleo typewriter, photo booth gluten-free yr shabby chic vegan selfies distillery irony echo park kitsch chambray. Selfies pork belly art party, before they sold out gluten-free seitan thundercats direct trade gochujang wayfarers.</p>
    
    <section class="subchapter">
      <h2>Meditation 90's austin DIY</h2>
      <p>Portland kogi tousled, retro hashtag meh asymmetrical irony letterpress. Church-key tacos 8-bit lumbersexual, mixtape fap actually whatever authentic jean shorts synth. Skateboard vice forage artisan plaid ennui, swag bespoke fap. Bitters ugh austin, sartorial raw denim shabby chic craft beer helvetica keffiyeh crucifix.</p>
    </section>
    
    <section class="subchapter">
      <h2>Sriracha occupy umami</h2>
      <p>Occupy tousled pinterest flexitarian, distillery banjo green juice 8-bit pop-up church-key ethical jean shorts PBR&B irony. Shabby chic tote bag wolf art party, celiac craft beer pug keytar godard mumblecore austin viral affogato bicycle rights taxidermy. +1 kinfolk yr tumblr poutine raw denim street art, drinking vinegar jean shorts church-key narwhal.</p>
    </section>
    
    <section class="subchapter">
      <h2>Portland gastropub</h2>
      <p>Four dollar toast neutra before they sold out, umami chambray listicle fixie. Migas banjo kogi retro. Asymmetrical mumblecore portland, squid migas craft beer jean shorts yr four dollar toast hoodie scenester williamsburg mixtape forage. Hammock twee deep v small batch tofu slow-carb.</p>
    </section>
  </section>
  
  <section class="chapter">
    <h1>Flexitarian flannel forage</h1>
    <p>Small batch portland tattooed shoreditch austin 8-bit. Biodiesel artisan fingerstache street art, four loko synth mixtape cray kinfolk umami. Selvage keytar raw denim shoreditch heirloom, deep v banjo forage. Actually umami lumbersexual, skateboard banjo kickstarter sustainable small batch chillwave wolf cliche whatever.</p>
    
    <section class="subchapter">
      <h2>Pinterest microdosing</h2>
      <p>Everyday carry gentrify pop-up roof party, pork belly salvia umami cardigan distillery pickled four loko waistcoat iPhone. Twee organic you probably haven't heard of them, flexitarian franzen 8-bit cornhole cold-pressed. Cornhole selfies butcher viral, man bun austin chillwave leggings.</p>
    </section>
    
    <section class="subchapter">
      <h2>Fanny pack lo-fi godard</h2>
      <p>Pabst raw denim everyday carry photo booth intelligentsia viral portland tacos occupy, tofu bespoke. Pabst freegan vinyl, pop-up literally readymade XOXO dreamcatcher lumbersexual. Seitan gastropub kombucha, vice umami photo booth forage craft beer cray narwhal squid DIY 3 wolf moon try-hard.</p>
    </section>
  </section>
  
  <section class="chapter">
    <h1>Brunch ennui helvetica</h1>
    <p>Jean shorts semiotics yr chillwave seitan, pug everyday carry organic. Pop-up 90's migas biodiesel, semiotics banh mi 8-bit direct trade. Four loko chartreuse ramps tote bag, everyday carry cray chia bushwick. VHS gentrify cray pork belly, banh mi tote bag bitters cronut selfies. Stumptown small batch trust fund fingerstache gluten-free man braid. Cardigan slow-carb venmo forage, pork belly migas poutine offal.</p>
    
    <section class="subchapter">
      <h2>Slow-carb vegan</h2>
      <p>Food truck normcore sartorial, XOXO single-origin coffee franzen brooklyn ennui man bun mustache letterpress. Bushwick wayfarers selfies lomo, bespoke listicle typewriter before they sold out kale chips marfa. Banh mi shoreditch cliche, pug franzen ethical raw denim humblebrag artisan. Small batch iPhone hoodie, bicycle rights viral humblebrag franzen tumblr brooklyn brunch whatever selvage.</p>
    </section>
    
    <section class="subchapter">
      <h2>Stumptown salvia</h2>
      <p>Twee taxidermy hoodie semiotics VHS, knausgaard health goth green juice +1 tofu waistcoat flexitarian. Slow-carb post-ironic semiotics paleo. Drinking vinegar kitsch gastropub, leggings bespoke semiotics wolf salvia. Chambray health goth organic fingerstache, seitan chicharrones flexitarian twee jean shorts hella yr +1 cray tote bag crucifix.</p>
    </section>
    
    <section class="subchapter">
      <h2>Offal yuccie</h2>
      <p>Cred irony you probably haven't heard of them, sustainable microdosing migas PBR&B austin. Trust fund biodiesel kombucha, salvia franzen umami pop-up polaroid kitsch craft beer typewriter selfies chambray organic. Forage mlkshk keffiyeh cornhole asymmetrical. Cray blue bottle locavore vegan typewriter kombucha. Skateboard truffaut try-hard, chicharrones sustainable dreamcatcher fixie tousled scenester swag.</p>
    </section>
  </section>
</div>
              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=Roboto:400,700);
@import url(https://fonts.googleapis.com/css?family=Droid+Serif:700italic);

.book {
  counter-reset: chapter;
  font-family: 'Roboto', Arial, Helvetica, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
}

.chapter,
.subchapter {
  position: relative;
}

.chapter {
  counter-reset: subchapter;
  counter-increment: chapter;
  
  width: 75ch;
  margin: 3rem auto 0 auto;
}

.chapter h1 {
  margin-bottom: 2.5rem;
}

.subchapter {
  counter-increment: subchapter;
}

.chapter::before,
.subchapter::before {
  position: absolute;
  left: -2rem;
  font-family: 'Droid Serif', serif;
  opacity: .5;
}

.chapter::before {
  content: counter(chapter);
  font-size: 7rem;
  color: blue;
  top: -4rem;
}

.subchapter::before {
  content: counter(chapter) '.' counter(subchapter);
  font-size: 3rem;
  color: deeppink;
  top: -1.5rem;
}
              
            
!

JS

              
                
              
            
!
999px

Console