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

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.

HTML

              
                <!-- html example -->
<article>
  <h1>Gameboy Color – Green</h1>
  <img src="gameboycolor.jpg" alt='Gameboy Color – Green' />
  <div>
    <h2>$35.00</h2>
    <a href="/buy-product/">Buy now</a>
  </div>
</article>

<!-- short microdata example -->
<article itemscope itemtype="https://schema.org/Product">
  <h1 itemprop="name">Gameboy Color – Green</h1>
  <img itemprop="image" src="gameboycolor.jpg" alt='Gameboy Color – Green' />
  
  <div itemprop="offers" itemscope itemtype="https://schema.org/Offer">
    <h2>
    	<span itemprop="priceCurrency" content="USD">$</span>
    	<span itemprop="price" content="35.00">35.00</span>
    </h2>
    <a href="/buy-product/" itemprop="url" content="/buy-product/">Buy now</a>
  </div>
</article>

<!-- short JSON-LD example -->
<script type="application/ld+json">
  {
    "@context": "https://schema.org",
    "@type": "Product",
    "name": "Gameboy Color - Green",
    "image": "gameboycolor.jpg",
    "offers": {
      "@type": "Offer",
      "price": "35.00",
      "priceCurrency": "USD",
      "url": "/buy-product/"
    }
  }
</script>

<!-- short RDFa example -->
<article vocab="https://schema.org/" typeof="Product">
  <h1 property="name">Gameboy Color - Green</h1>
  <img property="image" src="gameboycolor.jpg" alt='Gameboy Color - Green' />
  
  <div property="offers" typeof="Offer">
    <h2>
      <span property="priceCurrency" content="USD">$</span>
      <span property="price" content="35.00">35.00</span>
    </h2>
    <a property="url" content="/buy-product/" href="/buy-product/">Buy now</a>
  </div>
</article>

<!-- extended microdata example -->
<article itemscope itemtype="https://schema.org/Product">
  <h1 itemprop="name">Gameboy Color – Green</h1>
  <img itemprop="image" src="gameboycolor.jpg" alt='Gameboy Color – Green' />
  
  <div itemprop="offers" itemscope itemtype="https://schema.org/Offer">
    <h2>
    	<span itemprop="priceCurrency" content="USD">$</span>
    	<span itemprop="price" content="35.00">35.00</span>
    </h2>
 
    <meta itemprop="priceValidUntil" content="2021-12-31"/>
	  <link itemprop="availability" href="https://schema.org/InStock" />
    <p>In stock</p>
        
    <a itemprop="url" content="/buy-product/" href="/buy-product/">Buy now</a>
  </div>
  
  <section>
    <h3>Product description</h3>
    <p itemprop="description">Lorem, ipsum dolor sit amet consectetur adipisicing elit. Molestiae, numquam ea illum earum alias tempora quod cupiditate labore dicta nisi, laborum nihil dolorum? Modi nam asperiores obcaecati. Nesciunt, ullam deserunt.</p>
  </section>
  
  <section>
  	<h3>Product details</h3>
    <ul>
      <li>Product ID: <span itemprop="sku">1234567890</span></li>
  	  <li>GTIN: <span itemprop="gtin8">1234567890</span></li>
      <li>Brand: <span itemprop="brand">Nintendo</span></li>
    </ul>
  </section>
  
  
  <section>
    <h3>Product reviews</h3>
    <p itemprop="aggregateRating" itemscope itemtype="https://schema.org/AggregateRating">
      Overall rating: <span itemprop="ratingValue">3.5</span>/5 stars (based on <span itemprop="reviewCount">2</span> customer reviews)
    </p>
    <ol>
      <li itemprop="review" itemscope itemtype="https://schema.org/Review">
        <h5 itemprop="name">Not a happy camper</h5>
        <meta itemprop="datePublished" content="2020-04-01">
        <small>by <span itemprop="author">Ellie</span> on April 1, 2011</small>
        <p itemprop="reviewRating" itemscope itemtype="https://schema.org/Rating">
          <meta itemprop="worstRating" content="1">
          <span itemprop="ratingValue">3.5</span>/<span itemprop="bestRating">5</span>stars
        </p>
        <p itemprop="reviewBody">Kind of disappointed by the quality of the product, but it works pretty well.</p>
      </li>
      
      <li itemprop="review" itemscope itemtype="https://schema.org/Review">
        <h5 itemprop="name">Perfect!</h5>
        <meta itemprop="datePublished" content="2020-07-11">
        <small>by <span itemprop="author">Wario</span> on June 11, 2011</small>
        <p itemprop="reviewRating" itemscope itemtype="https://schema.org/Rating">
          <meta itemprop="worstRating" content="1">
          <span itemprop="ratingValue">5</span>/<span itemprop="bestRating">5</span>stars
        </p>
        <p itemprop="reviewBody">Exactly what I was looking for!</p>
      </li>
    </ol>
  </section>  
</article>

<!-- extended JSON-LD example -->
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Product",
  "name": "Gameboy Color – Green",
  "image": "gameboycolor.jpg",
  "description": "Lorem, ipsum dolor sit amet consectetur adipisicing elit. Molestiae, numquam ea illum earum alias tempora quod cupiditate labore dicta nisi, laborum nihil dolorum? Modi nam asperiores obcaecati. Nesciunt, ullam deserunt.",
  "sku": "1234567890",
  "gtin8": "1234567890",
  "brand": "Nintendo",
  "offers": {
    "@type": "Offer",
    "price": "35.00",
    "availability": "https://schema.org/InStock",
    "priceValidUntil": "2021-12-31",
    "priceCurrency": "USD",
    "url": "/buy-product/"
  },
  "aggregateRating": {
    "@type": "AggregateRating",
    "ratingValue": "3.5",
    "reviewCount": "2"
  },
  "review": [
    {
      "@type": "Review",
      "author": "Ellie",
      "datePublished": "2020-04-01",
      "reviewBody": "Kind of disappointed by the quality of the product, but it works pretty well.",
      "name": "Not a happy camper",
      "reviewRating": {
        "@type": "Rating",
        "bestRating": "5",
        "ratingValue": "3.5",
        "worstRating": "1"
      }
    },
    {
      "@type": "Review",
      "author": "Wario",
      "datePublished": "2020-07-11",
      "reviewBody": "Exactly what I was looking for!",
      "name": "Perfect!",
      "reviewRating": {
        "@type": "Rating",
        "bestRating": "5",
        "ratingValue": "5",
        "worstRating": "1"
      }
    }
  ]
}
</script>
              
            
!

CSS

              
                
              
            
!

JS

              
                
              
            
!
999px

Console