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.


                <div class="container">
  <p><em>Warning: Spoilers ahead!</em></p>
  <div class="has-spoiler">At the end of <em>Soylent Green</em>, Detective Frank Thorn discovers that <span class="spoiler-span"><details><summary></summary>Soylent Green is people.</details></span></div>
  <div class="has-spoiler">In <em>Citizen Kane</em>, "Rosebud" refers to Charles Foster Kane's <span class="spoiler-span"><details><summary></summary>childhood sled.</details></span></div>
  <div class="has-spoiler">At the end of <em>The Cabinet of Dr. Caligari</em>, the eponymous character is revealed to be <span class="spoiler-span"><details><summary></summary>an asylum director.</details></span></div>
  <div class="has-spoiler">At the end of <em>Empire Strikes Back</em>, <span class="spoiler-span"><details><summary></summary>Darth Vader</details></span> reveals that he is Luke Skywalker's <span class="spoiler-span"><details><summary></summary>father.</details></span></div>



                body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  font-size: 23px;
  line-height: 1.7em;
  background-color: #fafafa;
  color: #444444;

.container {
  min-height: 100vh;
  max-width: 28em;
  margin: 2em auto;
  display: flex;
  flex-flow: column nowrap;
  justify-content: center;

p, .has-spoiler {
  margin: 1.2em 0.8em;
  letter-spacing: 0.01em;

.spoiler-span {
  position: relative;

details {
  display: inline !important;
  line-height: 1.1em;
  color: #33bbaa;

summary {
  display: list-item;
  list-style-type: none;
  color: #990044;
  font-size: 0.78em;
  letter-spacing: 0.1em;

summary:before {
  content: "[SHOW SPOILER]";

summary::-webkit-details-marker {
  background: none;
  color: transparent;

summary:hover {
  color: #cc4477;

details[open] summary {
  position: absolute;
  top: 1.5em;
  left: 0;
  font-size: 0.6em;

details[open] summary:before {
  content: "[HIDE]";

:focus {
  border: 1px solid transparent;
  outline: none !important;
  -moz-appearance: none !important;