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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

HTML

            
              <div class="container">
<svg xmlns="http://www.w3.org/2000/svg"
 width="400px" 
 height="200px"
 viewBox="0 0 200 200">
  <text x="10" y="30">Rectangle</text>
<rect x="0" y="40" width="150" height="150" />
</svg>
  <svg xmlns="http://www.w3.org/2000/svg"
 width="400px" 
 height="200px"
 viewBox="0 0 200 200">
    <text x="10" y="30">Circle</text>
<circle r="50" cx="100" cy="100" fill="none" stroke="black"/>
  
</svg>
  <svg xmlns="http://www.w3.org/2000/svg"
 width="400px" 
 height="200px"
 viewBox="0 0 200 200">
    <text x="10" y="30">Ellipse</text>
<ellipse cx="150" cy="90" rx="100" ry="50" />
</svg>
  <svg xmlns="http://www.w3.org/2000/svg"
 width="400px" 
 height="200px"
 viewBox="0 0 200 200">
    <text x="10" y="30">Line</text>
<line x1="10" y1="50" x2="90" y2="50" stroke="black" stroke-width="2px"/>
    <line x1="10" y1="100" x2="90" y2="180" stroke="black" stroke-width="2px"/>
</svg>
  <svg xmlns="http://www.w3.org/2000/svg"
 width="400px" 
 height="200px"
 viewBox="0 0 200 200">
    <text x="10" y="30">Polyline</text>
<polyline points="10 50 50 80 100 90 150 90 200 170" stroke="black" fill="none" stroke-width="2px"/>
</svg>
  <svg xmlns="http://www.w3.org/2000/svg"
 width="400px" 
 height="200px"
 viewBox="0 0 150 150">
    <text x="0" y="30">Path with M, L, H, V & A</text>
     <!--   Example of arc -->
<path d="M 75 90 L 55 90 A 5 10 0  0 0 75 90" stroke="black" fill="none" stroke-width="2px"/>
    <!--   Example of arc x-axis-rotaion of 30   -->
    <path d="M 105 90 L 85 90 A 5 10 30  0 0 105 90" stroke="red" fill="none" stroke-width="2px"/>
    <!--   Example of arc large arc flag = 1   -->
    <path d="M 135 90 A 15 4 0 1 0 125 90" stroke="green" stroke-width="2px" fill="none"/>
<!--   Example of arc large arc flag = 0   -->
    <path d="M 135 90 A 15 4 0 0 0 125 90" stroke="red" stroke-width="2px" fill="none"/>
    <!-- Example of arc sweep flag = 1 -->
    <path d="M 165 90 L 145 90 A 5 10 0  0 1 165 90" stroke="blue" fill="none" stroke-width="2px"/>
    <!-- Example of horizontal line -->
    <path d="M 0 90 H 50" stroke="black" fill="none" stroke-width="2px"/>
<!-- Example of vertial line -->
    <path d="M 0 80 V 50" stroke="red" fill="none" stroke-width="2px"/>
</svg>
  <svg xmlns="http://www.w3.org/2000/svg"
 width="400px" 
 height="200px"
 viewBox="0 0 150 150">
    <text x="0" y="30">Path with C, Q and Z </text>
    <path d="M 0 50 Q 80 50 150 70Z" fill="red" stroke="black"/>
<!--     Example of quadratic baz -->
     <path d="M 0 90 Q 80 50 150 100" fill="none" stroke="black"/>
    <!--     Example of cubic baz -->
     <path d="M 0 150 C 80 100 150 100 100 150" fill="none" stroke="red"/>

</svg>
</div>
            
          
!

CSS

            
              .container {
  max-width: 900px;
  margin: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 10px;
}
svg {
  border: 1px solid black;
}
svg text {
  font-size: 16px;
  fill: red;
}
            
          
!

JS

            
              
            
          
!
999px

Console