Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

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


Auto Save

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 class="container">
  <div class="gbox">
    <h2>Hard linear gradient with same   position.</h2>
    <div class="box gradient1"></div>
    <div class="box gradient2"></div>
  <div class="gbox">
    <h2>Hard linear gradient with two   postion.</h2>
    <div class="box hardGradient"></div>


                .container {
  display: flex;
  justify-content: center;
  flex-direction: column;
.gbox {
  margin: 0 auto;
.box {
  width: 300px;
  height: 150px;
  margin: 1rem;
.gradient1 {
  background-image: linear-gradient(90deg, orange 50%, black 50%);
.gradient2 {
  background-image: linear-gradient(45deg, orange 50%, pink 50%, pink 60%, black 60%)
.hardGradient {
  background-image: linear-gradient(90deg, #d8bfd8 16.6%, #dda0dd 16.6% 33.2%, #da70d6 33.2% 49.8%, #ba55d3 49.8% 66.4%, #ff00ff 66.4% 83%, #c71585 83%);