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.


                <h1>Some things with gradient</h1>

<h2>A banner</h2>
<div class="banner">
  <img src="" width="205px" height="37px" alt="Codepen">

<h2>A big surface</h2>
<div class="banner bigsurface">
  <div class="block"></div>
  <div class="block"></div>
  <div class="block"></div>
  <div class="block"></div>
  <div class="block"></div>
  <div class="block"></div>

<p class="text-center">
  <button class="btn">The button</button>
  <button class="btn btn-ghost">The button</button>
<h2>Buttons rounded</h2>
<p class="text-center">
  <button class="btn btn-rounded">The button</button>
  <button class="btn btn-ghost  btn-rounded">The button</button>

<h2>Big button</h2>

<p class="text-center">
  <button class="btn btn-big-icon">♥</button>


                /* BANNER */
.banner {
  padding: 20px 30px 18px;
  background: linear-gradient(to right, #1DB0DC, #23D0D3);
  color: #FFF;

/* see banner */
.bigsurface {
  display: flex;
  min-height: 100vh;
  align-items: center;
  flex-wrap: wrap;
/* some blocks, just to illustrate */
.block {
  width: 30%;
  margin: 2em 1.5%;
  height: 200px;
  background: #FFF;
  box-shadow: 1px 1px 3px rgba(0,0,0,.1), 1px 1px 10px rgba(0,0,0,.1);

.btn {
  padding: 10px 25px;
  border: 2px solid #FFF;
  border-image: linear-gradient(to right, #1DB0DC, #23D0D3) 20 stretch;
  font-size: 1em;
  font-weight: bold;
  color: #FFF;
  background: linear-gradient(to right, #1DB0DC, #23D0D3);
  cursor: pointer;
  transition: all .3s;
    filter: hue-rotate(0deg) saturate(1);
.btn:focus {
  filter: hue-rotate(10deg) saturate(1.2);
.btn-ghost {
  background: transparent;
  color: #1DB0DC;

.btn-rounded {
  position: relative;
  border-radius: 7px;
  border-image: none;

.btn-rounded::after {
  content: "";
  z-index: -1;
  position: absolute;
  border-radius: 6px;

.btn-rounded::before {
  right: -2px;
  top: -2px;
  left: -2px;
  bottom: -2px;
  background: linear-gradient(to right, #1DB0DC, #23D0D3);

.btn-ghost.btn-rounded::after {
  top: 0; right: 0; left: 0; bottom: 0;
  border-radius: 4px;
  background: #FFF;

.btn-big-icon {
  width: 100px;
  height: 100px;
  border: none;
  border-radius: 50%;
  font-size: 2.5em;
  box-shadow: 1px 1px 6px rgba(0,0,0,.1), 1px 1px 2px rgba(0,0,0,.2);
.btn-big-icon:focus {
  box-shadow: 1px 1px 8px rgba(0,0,0,.15), 1px 1px 3px rgba(0,0,0,.2) 

/* Some other styles */
body {
  padding: 0 0 50px 0;
  margin: 0;
  font-family: sans-serif;
  color: #666;
h1, h2 {
  margin-top: 2em;
  text-align: center;
  font-weight: lighter;
.text-center {
  text-align: center;