Pen Settings



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


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.


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.


                <!doctype html>
    <script type="text/javascript">
        var _iub = _iub || [];
        _iub.csConfiguration = {
            "lang": "en",
            "siteId": 896537, //use your siteId
            "cookiePolicyId": 8207462, //use your cookiePolicyId
            "consentOnContinuedBrowsing": false, //avoid to collect consent by scrolling and continued browsing activity
            "banner": {
                "position": "float-top-center",
                "acceptButtonDisplay": true,
                "customizeButtonDisplay": true,
                "rejectButtonDisplay": true //show reject button
            //some (optional) callbacks that our Cookie Solution can perform upon the occurrence of an event
            "callback": {
                "onConsentGiven": function() {
                    //invoked if the user has given the consent to the installation of cookies
                "onConsentRejected": function() {
                    //invoked if the user has rejected the consent to the installation of cookies
                "onPreferenceExpressed": function(preference) {
                    //fires whenever a preference is expressed, be it accept or reject
                    console.log('onPreferenceExpressed', preference);
    <script type="text/javascript" src="//" charset="UTF-8" async></script>

      <div class="wrapper">
        <h1>iubenda Cookie Solution</h1>
        <p>Cookie banner with reject button</p>
    <section class="wrapper">
      <p>This is one of the easiest setups of our Cookie Solution: it's essentially the default configuration with the exception of consent on continued browsing (disabled here), and the addition of the <strong>reject button</strong>.</p>
      <p>The reject button allows your users to refuse giving consent to cookies by clicking on the explicit reject button instead of on the standard close icon (automatically disabled). This option is particularly relevant to users who operate in the UK as the ICO now requires that a reject button be displayed.</p>
      <p>On the configurator:</p>
      <img src="" style="max-width:470px;" />
      <p>As with most other elements in the Cookie Solution, the color and text of the button are fully customizable. Read our advanced guide to learn more about <a href="" target="_blank">customization</a> and <a href="" target="_blank">callbacks</a> (like <code>onConsentGiven</code>, <code>onConsentRejected</code> and <code>onPreferenceExpressed</code>).</p>
      <div class="note">
          <li>Remember to use your own credentials from <a href="" target="_blank">your iubenda account</a></li>
          <li>This is a sample for pure demonstrative purposes, <strong>no consents are saved</strong> (result of <code>_iub.csConfiguration.skipSaveConsent = true</code>). Just refresh the page to make the cookie banner reappear.</li>
      <h3>Block cookies prior to consent</h3>
      <p>To demonstrate the cookie blocking feature, we've embed a YouTube video:</p>
      <div class="embed-container"-->
        <!-- please note type="text/plain" class="_iub_cs_activate" data-suppressedsrc="..." (manual tagging) -->
        <iframe type="text/plain" class="_iub_cs_activate" width="560" height="315" data-suppressedsrc="" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
      <p>And a Twitter follow button:</p>  
      <!-- please note type="text/plain" class="_iub_cs_activate" data-suppressedsrc="..." (manual tagging) -->
      <a href="" class="twitter-follow-button" data-show-count="true" data-size="large">Follow @iubenda</a>
<script async type="text/plain" class="_iub_cs_activate" data-suppressedsrc="" charset="utf-8"></script>
      <p>Both scripts are blocked through manual tagging, one of the <a href="" target="_blank">methods available</a> with the Cookie Solution. Click on the <strong>Accept</strong> button to release these scripts (refresh the page to return to the starting point).</p>
      <hr />
      <h4>Helpful guides</h4>
      <ul class="guides">
        <li><a href="" target="_blank">Cookie Solution - Getting Started</a></li> 
        <li><a href="" target="_blank">How to Customize the Look and Behavior of the Cookie Banner (Beginner's Guide)</a></li>
        <li><a href="" target="_blank">How to Configure Your Cookie Solution (Advanced Guide)</a></li>
        <li><a href="" target="_blank">Introduction to the Prior Blocking of Cookies</a></li>




                //don't copy this JS (just for demo purposes)

//don't save consent, always show the banner
_iub.csConfiguration.skipSaveConsent = true;