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

              
                <!DOCTYPE html>
<html>
<style>
.circle2 {
width: 100px;
height: 100px;
}
svg {
border: 1px dashed #ccc;
}
</style>
<body>

<svg height="100" width="100">
  <circle cx="50" cy="50" r="50" fill="red" />
</svg> 
  <p>Height and width specified as inline attributes</p>

<svg class="circle2" viewBox="0 0 100 100">
  <circle cx="50" cy="50" r="50" fill="red" />
</svg>
  
    <p>Height and width specified in CSS class</p>

<svg class="circle2" viewBox="0 0 200 200">
  <circle cx="50" cy="50" r="50" fill="red" />
</svg>

  <p>Viewbox height and width double the height and width of the circle</p>
  
<svg class="circle2" viewBox="0 0 50 50">
  <circle cx="50" cy="50" r="50" fill="red" />
</svg>

  <p>Viewbox height and width half the height and width of the circle</p>
  
<svg class="circle2" viewBox="-50 -50 100 100">
  <circle cx="50" cy="50" r="50" fill="red" />
</svg>
  
    <p>Top left corner of circle moved down 50px and to the right 50px</p>

<svg class="circle2" viewBox="50 50 100 100">
  <circle cx="50" cy="50" r="50" fill="red" />
</svg>
  
    <p>Top left corner of circle moved up 50px and to the left 50px</p>
  

<svg class="circle2" viewBox="0 0 100 50">
  <circle cx="50" cy="50" r="50" fill="red" />
</svg>
  
    <p>Aspect ratio of viewbox (100 width by 50 high) doesn't match aspect ratio of image (100 x 100)</p>

 
</body>
</html>

              
            
!

CSS

              
                
              
            
!

JS

              
                
              
            
!
999px

Console