Pen Settings

HTML

CSS

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

JavaScript

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

Packages

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.

Behavior

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.

HTML

              
                <div>
  <h1>Fun <span id="someday">Someday</span> Ideas</h1>

  <ul>
    <li>Bike the <span id="trail">McKenzie Trail</span></li>
    <li>Eat at that rooftop bar in Redmond</li>
    <li>Lake of the Woods in Klamath Falls</li>
    <li>Stay in <span id="yahats">Yahats</span></li>
    <li>Weekend at Suttle Lodge</li>
    <li>Go visit the <span id="hills">Painted Hills</span>
  </ul>
</div>
              
            
!

CSS

              
                body {
  font: 100% system-ui;
  margin: 0;
  height: 100vh;
  display: grid;
  place-items: center;
}
h1 {
  font-weight: 900;
  margin: 0 0 0.5rem 0;
}
div {
  padding: 3rem 5rem;
  border: 1px solid #ddd;
  box-shadow: 0 0.25rem 0.5rem rgba(black, 0.1);
  border-radius: 1rem;
}
ul {
  padding: 0 0 0 1.3rem;
}
li {
  margin: 0 0 0.5rem 0;
}

              
            
!

JS

              
                import { annotate } from "https://unpkg.com/rough-notation?module";

const n1 = document.querySelector("#someday");
const n2 = document.querySelector("#trail");
const n3 = document.querySelector("#hills");
const n4 = document.querySelector("#yahats");

const a1 = annotate(n1, { type: "highlight", color: "yellow", padding: 15 });
const a2 = annotate(n2, { type: "underline", color: "red" });
const a3 = annotate(n3, { type: "underline", color: "red" });
const a4 = annotate(n4, { type: "box", color: "orange" });

a1.show();
a2.show();
a3.show();
a4.show();

              
            
!
999px

Console