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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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.


                <script type="text/javascript">
  var _iub = _iub || [];
  _iub.csConfiguration = {
    lang: 'en',
    cookiePolicyId: 64274586,
    enableCcpa: true,
    ccpaApplies: true, // forces CCPA to apply, if removed, CCPA will apply only if the user is based in California
    ccpaAppliesToEntireUSA: true,
    enableGdpr: true,
    gdprAppliesGlobally: false,
    countryDetection: true,
    skipSaveConsent: true,
    banner: {
      acceptButtonDisplay: true,
    logLevel: "debug",
<script async src="//"></script>

<!-- Facebook Pixel Code -->
setting the script type to "text/plain" with the class "_iub_cs_activate-inline"
will block the script from executing if GDPR applies,
this is to get the user's consent first before tracking
a page view with the Facebook Pixel

N.B. in case the GDPR does not apply and only the CCPA applies,
the script will not be blocked and will record a page view using
the Facebook Pixel, however in case the user chooses to opt-out of 
the CCPA using the "do not sell" prompt in the banner then
subsequent page visits will set Limited Data Use in the Data Processing 
Options of the Facebook Pixel
<script type="text/plain" class="_iub_cs_activate-inline">
   s.parentNode.insertBefore(t,s)}(window, document,'script',
  // this is the only check needed through the Cookie Solution to see 
  // whether the user opted-out of the CCPA
  // and based on this sets Limited Data Use in the Data Processing 
  // Options of the Facebook Pixel
  if (_iub.cs.api.isCcpaOptedOut()) {
    fbq('dataProcessingOptions', ['LDU'], 0, 0);
  // then we can initialize the Facebook Pixel
  // and track the page view
  fbq('init', '123456');
  fbq('track', 'PageView');
  <img height="1" width="1" style="display:none" 
<!-- End Facebook Pixel Code -->