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

              
                <section class="container">

<p>Lord Henry looked at him. Yes, he was certainly wonderfully handsome, with his finely curved scarlet lips, his frank blue eyes, his crisp gold hair. There was something in his face that made one trust him at once. All the candour of youth was there, as well as all youth’s passionate purity. One felt that he had kept himself unspotted from the world. No wonder Basil Hallward worshipped him. “You are too charming to go in for philanthropy, Mr. Gray—far too charming.” And Lord Henry flung himself down on the divan and opened his cigarette-case.</p>

<p>The painter had been busy mixing his colours and getting his brushes ready. He was looking worried, and when he heard Lord Henry’s last remark, he glanced at him, hesitated for a moment, and then said, “Harry, I want to finish this picture to-day. Would you think it awfully rude of me if I asked you to go away?”</p>

<p>Lord Henry smiled and looked at Dorian Gray. “Am I to go, Mr. Gray?” he asked.</p>
</section>
              
            
!

CSS

              
                html, body {
  height: 100%; 
}

body {
  font-family: 'Open Sans', sans-serif;
  display: flex;
  margin: auto;
  justify-content: center;
  color: #333;
}

.container {
  margin: 100px 15px;
  max-width: 670px;
  
  @media screen and (min-width: 600px){ 
    padding: 0 30px;
  }
}

p {
  font-size: 16px;
  line-height: 26px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  
  @media screen and (min-width: 600px){ 
    font-size: 18px;
    line-height: 30px;
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console