Pen Settings

HTML

CSS

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

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

              
                <script type="text/javascript">
  var _iub = _iub || [];
  _iub.csConfiguration = {
    lang: 'en',
    cookiePolicyId: 417383,
    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>
<script async src="//cdn.iubenda.com/cs/iubenda_cs.js"></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">
  !function(f,b,e,v,n,t,s)
  {if(f.fbq)return;n=f.fbq=function(){n.callMethod?
    n.callMethod.apply(n,arguments):n.queue.push(arguments)};
   if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
   n.queue=[];t=b.createElement(e);t.async=!0;
   t.src=v;s=b.getElementsByTagName(e)[0];
   s.parentNode.insertBefore(t,s)}(window, document,'script',
                                   'https://connect.facebook.net/en_US/fbevents.js');
  
  // 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');
</script>
<noscript>
  <img height="1" width="1" style="display:none" 
       src="https://www.facebook.com/tr?id=123456&ev=PageView&noscript=1"/>
</noscript>
<!-- End Facebook Pixel Code -->

              
            
!

CSS

              
                
              
            
!

JS

              
                
              
            
!
999px

Console