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">
<h1>The Lost Treasure of Captain Blackbeard</h1>

<p>Once upon a time, there was a legendary pirate named Captain Blackbeard who terrorized the seas. He was known for his fearsome reputation, his long black beard, and his hidden treasure.</p>

<p>One day, Captain Blackbeard and his crew were ambushed by a rival pirate gang and forced to abandon their ship. Before he was captured, Captain Blackbeard hid his treasure on a secret island, vowing to one day return and reclaim it.</p>

<p>Years passed, and the treasure remained hidden. Many pirates searched for it, but none were able to find it. The location of the island was known only to Captain Blackbeard, who took the secret to his grave.</p>

<p>That is, until a young pirate named Jack stumbled upon a map that had been passed down through generations of pirates. The map led him to the secret island, where he discovered the lost treasure of Captain Blackbeard.</p>

<p>Excited by his discovery, Jack set sail back to civilization, eager to share his riches with the world. But he soon realized that the treasure brought more trouble than he bargained for. Pirates from all over the world came after him, eager to claim the treasure for themselves.</p>

<p>In the end, Jack was able to outwit his pursuers and keep the treasure for himself. He lived a long and prosperous life, always remembering the adventures and battles he faced in search of the lost treasure of Captain Blackbeard.</p>


                :root {
  box-sizing: border-box;

* {
  &::after {
    box-sizing: inherit;

body {
  margin: 0;
  background: #fdd;
  font: 1em/160% 'Libre Baskerville', serif;

h1 {
  font-family: 'Bungee Spice', serif;
  font-palette: --custom-palette;
  line-height: 120%;
  font-size: 10vmin;
  max-width: 960px;

@font-palette-values --custom-palette {
  font-family: 'Bungee Spice';
  override-colors: 0 hsl(0 55% 55%), 1 hsl(0 15% 15%);

.container {
  padding: 10vmin;
  max-width: 680px;

@media (prefers-color-scheme: dark) {
  body {
    background: hsl(0 25% 25%);
    color: hsl(0 25% 75%);
  @font-palette-values --custom-palette {
    font-family: 'Bungee Spice';
    override-colors: 0 hsl(0 65% 65%), 1 hsl(0 85% 85%);