Pen Settings



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


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


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.


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.


                <p style="white-space: normal">This paragraph has <code>white-space: normal</code>. It collapses new lines.
  This sentence starts on a new line, but will be displayed on the same line. It has been collapsed.
    You'll also won't see that this sentence starts with two spaces, as it is also collapsed.
  What you are able to see, is that the sentences neatly wrap within the box.
  It will also remove any space at the end of the sentence (highlight the sentence to see)                    

<p style="white-space: nowrap">This paragraph has <code>white-space: nowrap</code>.
It is mostly the same as <code>white-space: normal</code> and will ignore new lines and multiple spaces. But it will also not wrap within the box.             </p>

<p style="white-space: pre;">This paragraph has <code>white-space: pre</code>.
As you might notice, this value preserves new lines.
  It will also preserve any extra spaces that you add.
It will also not wrap within the box. This is very much the opposite of <code>white-space: normal</code>. It will also preserve all spaces at the end of a sentence (highlight this sentence to see)                    </p>

<p style="white-space: pre-wrap;">This paragraph has <code>white-space: pre-wrap</code>.
It is very much the same as <code>white-space: pre</code>.
  It will preserve new lines and extra spaces. But it will also neatly wrap within the box when the sentences get too long.
It won't wrap when a sentence ends with a lot of spaces. It will let those "hang".                      
Even though the sentence before this ends with a lot of spaces (check by highlighting the sentence), it will not be wrapped.</p>

<p style="white-space: pre-line">This paragraph has <code>white-space: pre-line</code>.
This styling is very similar to the default behaviour which is <code>white-space: normal</code>.
  You won't notice this sentences starts with two spaces. It will also wrap neatly within the box when the sentences get too long and it removes any trailing spaces (as after this sentence)                   
The only difference is, that it preserves new lines.</p>

<p style="white-space: break-spaces">This paragraph has <code>white-space: break-spaces</code> which is relatively new.
    It's behaviour is most like <code>white-space: pre-wrap</code> as it will preserve new lines and spaces but will also wrap neatly within the box.
The only difference is that it will wrap a sentence when it ends with multiple spaces                
The gap above is caused by multiple spaces at the end of the sentence. You can highlight the sentence to see the spaces.</p>


                p {
  border: thin solid #ccc;
  line-height: 1.7;
  font-family: 'Inter', sans-serif;
  max-width: 70ch;

code {
  background-color: #f1f1f1;
  border: thin solid #ccc;
  border-radius: 4px;
  color: #cc3300;
  font-size: 16px;
  padding: 4px;