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

              
                <h2>Checkboxes and Radio Inputs</h2>
<p id="version">Last updated in <a href="https://cdn.watermarkinsights.com/css/1.1.3/wm-global.css" target="blank">1.1.3</a></p>
<p>Code checkboxes and radio buttons as the input element followed by the corresponding label element. They require the Material Design Icon library. Install via your preferred method or by linking to the stylesheet here https://cdn.materialdesignicons.com/3.6.95/css/materialdesignicons.min.css</p>

<div class="container">
  <input type="checkbox" id="chkbx1" class="chkbx-input" />
  <label for="chkbx1" class="chkbx">Unchecked checkbox</label>
</div>

<div class="container">
  <input type="checkbox" id="chkbx2" class="chkbx-input" checked />
  <label for="chkbx2" class="chkbx">Pre-checked checkbox</label>
</div>

<div class="container">
  <input type="checkbox" id="chkbx3" class="chkbx-input" disabled />
  <label for="chkbx3" class="chkbx">Unchecked disabled checkbox</label>
</div>

<div class="container">
  <input type="checkbox" id="chkbx4" class="chkbx-input" checked disabled/>
  <label for="chkbx4" class="chkbx">Pre-checked disabled checkbox</label>
</div>

<div class="container">
  <input type="radio" id="radio1" name="rdo" class="radio-input" />
  <label for="radio1" class="radio">Unchecked radio button</label>
</div>

<div class="container">
  <input type="radio" id="radio2" name="rdo" class="radio-input" checked />
  <label for="radio2" class="radio">Pre-checked radio button</label>
</div>

<div class="container">
  <input type="radio" id="radio3" name="rdo2" class="radio-input" disabled />
  <label for="radio3" class="radio">Unchecked disabled radio button</label>
</div>

<div class="container">
  <input type="radio" id="radio4" name="rdo2" class="radio-input" checked disabled />
  <label for="radio4" class="radio">Pre-checked disabled radio button</label>
</div>
        

              
            
!

CSS

              
                html, body {
  height: auto;
}
body {
  padding: 0 20px 40px;
  font-size: 14px;
}
h2 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 0;
  
  &:not(:first-of-type) {
    margin-top: 32px;
  }
  
  + p {
    margin-top: 0;
  }
}
h3 {
  font-size: 22px;
  font-weight: 400;
  margin: 32px 0 0;
  
  + p {
    margin-top: 0;
  }
}
.container {
  margin-bottom: 1rem;
}
#version {
  font-style: italic;
}
              
            
!

JS

              
                
              
            
!
999px

Console