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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ 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>Title of Post</h1>
  <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Consectetur a unde laborum ex dolore mollitia est, doloremque magnam laudantium obcaecati quas vero tenetur excepturi et praesentium veritatis optio quisquam perferendis?</p>
  <p>Tempore ex aspernatur doloremque. Minima cumque dolorum nam, a error necessitatibus magnam natus maiores sit alias, iusto reprehenderit sapiente tempore doloremque exercitationem nihil voluptate corporis sed ipsa at? Eos, voluptas.</p>


                article {
  max-width: 400px;
  margin: 2rem auto;
  padding: 2rem;
  background: #eee;
  box-shadow: 0 5px 5px rgba(black, 0.2);
  font: 300 100%/1.5 system-ui;
  border-radius: 6px;
  h1 {
    margin: 0 0 1rem 0;
  > :last-child {
    margin-block-end: 0;



                if (navigator.share) {
  const article = document.querySelector("article");
    <button onclick="window.doSharing(this)">Share</button>

window.doSharing = (el) => {
    title: el.parentNode.querySelector("h1").innerText,
    text: el.parentNode.querySelector("p").innerText,
    url: ""