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

              
                
<!-- 
this 2 lines of script is what powers this site. The 1st line indicates the CDN to leverage for loading. The 2nd is actually loading in the definition registry. By updating the registry we can power any web site anywhere.
-->
<script>window.__appCDN="https://cdn.webcomponents.psu.edu/cdn/";</script><script src="https://cdn.webcomponents.psu.edu/cdn/build.js"></script>
<h2>A sample pen to demonstrate the unbundler</h2>
<meme-maker image-url="https://upload.wikimedia.org/wikipedia/commons/5/56/White_shark.jpg" top-text="stuff" bottom-text="things"></meme-maker>
<wikipedia-query search="State College, Pennsylvania"></wikipedia-query>
<wikipedia-query search="Philadelphia"></wikipedia-query>
<voice-recorder>
          </voice-recorder>
<wikipedia-query search="New York"></wikipedia-query>
<p>Any web component that exists in <a href="https://cdn.webcomponents.psu.edu/cdn/wc-registry.json" target="_blank">wc-registry.json</a> will work here and automatically hydrate. A few are added to the page for demonstration purposes</p>

<self-check accent-color="light-blue" title="Sharks Self Check" image="https://upload.wikimedia.org/wikipedia/commons/5/56/White_shark.jpg" alt="Great White Shark">
  <span slot="question">How large can the average great white shark grow to be?</span>
  The Great White shark can grow to be 15 ft to more than 20 ft in length and weigh 2.5 tons or more.
</self-check>
<self-check accent-color="yellow" dark title="Video Game Trivia" image="https://c1.staticflickr.com/5/4139/4865516413_1df74bbcc2_n.jpg" alt="Pac-Man screenshot" link="https://en.wikipedia.org/wiki/Pac-Man#enemies">
  <span slot="question">What are the names of the ghosts that chase Pac-Man?</span>
  The red ghost is Blinky, the pink ghost is Pinky,
  the cyan ghost is Inky, and the orange ghost is clyde.
</self-check>
<music-player source="https://magenta.github.io/magenta-js/music/demos/melody.mid"></music-player>
<license-element creator="Bryan Ollendyke" scope="sibling" license="by" title="HAX developed webcomponents" source="https://haxtheweb.org"></license-element>
<code-sample>
  <template>
    let s=200;
    console.log("hello");
  </template>
  </code-sample>
<air-horn>
<meme-maker alt="happy dance GIF by SpongeBob SquarePants" image-url="https://media0.giphy.com/media/nDSlfqf0gn5g4/giphy.gif" top-text="someonene" bottom-text="Are" imageurl="https://media0.giphy.com/media/nDSlfqf0gn5g4/giphy.gif">
</air-horn>
<!-- Try adding the following which will dynamically import the grid-plate and meme-maker tags to give you a fun grid of sponges:

<grid-plate layout="4/4/4" responsive-size="xs" breakpoint-sm="900" breakpoint-md="1200" breakpoint-lg="1500" breakpoint-xl="1800" column-widths="[&quot;33.3333333%&quot;,&quot;33.3333333%&quot;,&quot;33.3333333%&quot;]" hide-ops="" responsive-width="770" disable-responsive="" columns="6">
<meme-maker alt="happy dance GIF by SpongeBob SquarePants" image-url="https://media0.giphy.com/media/nDSlfqf0gn5g4/giphy.gif" bottom-text="Are" thereimageurl="https://media0.giphy.com/media/nDSlfqf0gn5g4/giphy.gif" toptext="happy dance GIF by SpongeBob SquarePants" slot="col-1">
    
      <img src="https://media0.giphy.com/media/nDSlfqf0gn5g4/giphy.gif" alt="happy dance GIF by SpongeBob SquarePants" preload="lazy" aria-describedby="">
    <div>Are</div></meme-maker>
<meme-maker alt="happy dance GIF by SpongeBob SquarePants" image-url="https://media0.giphy.com/media/nDSlfqf0gn5g4/giphy.gif" bottom-text="Ready?" imageurl="https://media0.giphy.com/media/nDSlfqf0gn5g4/giphy.gif" toptext="happy dance GIF by SpongeBob SquarePants" slot="col-3" top-text="">
    
      <img src="https://media0.giphy.com/media/nDSlfqf0gn5g4/giphy.gif" alt="happy dance GIF by SpongeBob SquarePants" preload="lazy" aria-describedby="">
    <div>Ready?</div></meme-maker>
<meme-maker alt="happy dance GIF by SpongeBob SquarePants" image-url="https://media0.giphy.com/media/nDSlfqf0gn5g4/giphy.gif" bottom-text="You" imageurl="https://media0.giphy.com/media/nDSlfqf0gn5g4/giphy.gif" toptext="happy dance GIF by SpongeBob SquarePants" slot="col-2">
    
      <img src="https://media0.giphy.com/media/nDSlfqf0gn5g4/giphy.gif" alt="happy dance GIF by SpongeBob SquarePants" preload="lazy" aria-describedby="">
    <div>You</div></meme-maker>
</grid-plate> 

-->
<hax-logo size="small">
  <type-writer slot="post" text="&nbsp;the=&quot;web&quot; all-of-it" speed="200"></type-writer>
</hax-logo>
  <type-writer text="Any tag you type in here that is listed in the link below, will 'JustWork'(tm)" speed="200"></type-writer>
              
            
!

CSS

              
                body {
  padding: 0 100px;
  marring: 20px 25%;
}
              
            
!

JS

              
                
              
            
!
999px

Console