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="wrapper-light">
    <p>During my researches in the Leviathanic histories, I stumbled upon an ancient Dutch volume, which, by the musty whaling smell of it, I knew must be about whalers. The title was, “Dan Coopman,” wherefore I concluded that this must be the invaluable memoirs of some Amsterdam cooper in the fishery, as every whale ship must carry its cooper. I was reinforced in this opinion by seeing that it was the production of one “Fitz Swackhammer.” But my friend Dr. Snodhead, a very learned man, professor of Low Dutch and High German in the college of Santa Claus and St. Pott’s, to whom I handed the work for translation, giving him a box of sperm candles for his trouble—this same Dr. Snodhead, so soon as he spied the book, assured me that “Dan Coopman” did not mean “The Cooper,” but “The Merchant.”</p>
  </div>
  <div class="wrapper-dark">
    <p>During my researches in the Leviathanic histories, I stumbled upon an ancient Dutch volume, which, by the musty whaling smell of it, I knew must be about whalers. The title was, “Dan Coopman,” wherefore I concluded that this must be the invaluable memoirs of some Amsterdam cooper in the fishery, as every whale ship must carry its cooper. I was reinforced in this opinion by seeing that it was the production of one “Fitz Swackhammer.” But my friend Dr. Snodhead, a very learned man, professor of Low Dutch and High German in the college of Santa Claus and St. Pott’s, to whom I handed the work for translation, giving him a box of sperm candles for his trouble—this same Dr. Snodhead, so soon as he spied the book, assured me that “Dan Coopman” did not mean “The Cooper,” but “The Merchant.”</p>
  </div>
              
            
!

CSS

              
                * {
  box-sizing: border-box;
}

body,
html {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  display: flex;
  font-family: "Literata", serif;
  overflow: hidden;
  color: #222;
}

[class*="wrapper"] {
  display: grid;
  place-items: center;
  width: 50vw;
  padding: 40px;
  overflow: hidden;
}

p {
  line-height: 1.43;
  font-size: 20px;
  max-width: 640px;
  font-weight: 500;
}

.wrapper-dark {
  background-color: #111;
  color: white;
}

              
            
!

JS

              
                
              
            
!
999px

Console