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="container">
  <h3>Lines break/wrap as they normally do, long words overflow their container</h3>
  <div class="text">
    <strong>pneumonoultramicroscopicsilicovolcanoconiosis</strong>   refers to a lung disease contracted from the inhalation of very fine silica particles,[8] specifically from a volcano; 
  </div>
</div>
<div class="container">
  <h3>Only overflowing words break using word-wrap/overflow-wrap</h3>
  <div class="text text-1">
    <strong>pneumonoultramicroscopicsilicovolcanoconiosis</strong>   refers to a lung disease contracted from the inhalation of very fine silica particles,[8] specifically from a volcano; 
  </div>
</div>
<div class="container">
  <h3>Both overflowing (long) words and words at end of lines break to fit lines</h3>
  <div class="text text-2">
    <strong>pneumonoultramicroscopicsilicovolcanoconiosis</strong>   refers to a lung disease contracted from the inhalation of very fine silica particles,[8] specifically <strong>from</strong> a volcano. </div>
</div>
              
            
!

CSS

              
                body {
  background-color: #F5F5F5;
  color: #555;
  font-size: 1.1em;
  line-height: 1.5;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.container {
  margin: 50px auto;
  max-width: 700px;
}

.text {
  padding: 20px;
  background-color: #0099cc;
  color: white;
  width: 300px;
  margin: 30px auto;
  text-align: justify;
  /*    box-sizing: border-box;*/
}

.text-1 {
  word-wrap: break-word;
  /* added this just to show that word-wrap has precedence over word-break */

  word-break: keep-all;
}

.text-2 {
  /* breaking words using word-break will also break words that would break using word-wrap */

  word-break: break-all;
}

strong {
  background-color: #006699;
}
              
            
!

JS

              
                
              
            
!
999px

Console