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. 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


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.


                <div id="background-image" class="experiment"></div>

<div class="experiment"><img src=""></div>

<svg id="svg-use" class="experiment" xmlns="" xmlns:xlink="" viewBox="0 0 64 64">
  <use xlink:href="" width="64" height="64" />

  <p>I'm trying to refer to a <code>&lt;symbol&gt;</code> defined inside an external <code>.svg</code> file. They both should show the twitter icon.</p>
  <p>The first square uses CSS <code>background-image: url(;</code>. Instead of showing just the Twitter icon, it shows the whole SVG image (Chrome 35 and Firefox 29).</p>
  <p>The second square uses <code>&lt;img&gt;</code> tag to point to the the symbol inside the SVG. It does not work.</p>
  <p>The third square uses an SVG <code>&lt;use&gt;</code> element. It fails because browsers block this cross-domain request. However, it works correctly in Chrome 35 and Firefox 29 if both files are on the same domain.</p>
  <p>See also: <a href="">Icon System with SVG Sprites</a></p>
  <p><strong>UPDATE!</strong> See <a href="">Better SVG Sprites With Fragment Identifiers</a></p>


                .experiment {
  display: inline-block;
  width: 64px;
  height: 64px;
  background-color: #FFC;
  border: 1px solid black;
#background-image {
  background-image: url(;