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.


      <h1>A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring which I enjoy with my whole heart.</h1>
    I am so happy, my dear friend, so absorbed in the exquisite sense of mere tranquil existence, that I neglect my talents. I should be incapable of drawing a single stroke at the present moment; and yet I feel that I never was a greater artist than now.
    When, while the lovely valley teems with vapour around me, and the meridian sun strikes the upper surface of the impenetrable foliage of my trees, and but a few stray gleams steal into the inner sanctuary, I throw myself down among the tall grass by the trickling stream; and, as I lie close to the earth, a thousand unknown plants are noticed by me: when I hear the buzz of the little world among the stalks, and grow familiar with the countless indescribable forms of the insects and flies, then I feel the presence of the Almighty, who formed us in his own image, and the breath.



  <button class="switch" data-switch-dark aria-hidden>Night mode</button>


                $color-black: rgb(0,0,0);
$color-white: rgb(255,255,255);
$color-gray-light: rgba($color-white, .15);
$color-gray-dark: rgba($color-black, .15);

:root {
  --color-page-background: #{$color-gray-dark};
  --color-text: #{$color-black};
  --color-border: #{$color-black};
  --color-article-background: #{$color-white};
  --color-article-shadow: #{$color-gray-dark};

.dark {
  --color-page-background: #{$color-black};
  --color-text: #{$color-white};
  --color-border: #{$color-white};
  --color-article-background: #{$color-gray-light};
  --color-article-shadow: #{$color-gray-dark};

* {
  transition: all .15s ease;

body {
  background-color: var(--color-page-background);
  font: 1.1em/1.4 Dosis;
  color: var(--color-text);

main {
  max-width: 40rem;
  margin: auto;
  padding: 1rem;

article {
  padding: 2rem;
  background-color: var(--color-article-background);
  box-shadow: 6px 6px 0 0 var(--color-article-shadow);

.switch {
  position: fixed;
  right: 2rem;
  top: 2rem;
  height: 3rem;
  width: 3rem;
  background-color: var(--color-black);
  border: 1px solid  var(--color-text);
  color: var(--color-text);
  border-radius: 50%;


                document.querySelector('[data-switch-dark]').addEventListener('click', function() {