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

              
                <div>
  <h2><b>:checked</b> for Checkbox</h2>
  <!-- checkbox sample -->
  <input type="checkbox" /> Do you want More Info
  <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Recusandae tempore minus corporis eum quasi. Assumenda ut debitis tempora ea distinctio quia, error, laudantium accusantium soluta numquam iure est alias sunt molestias dicta optio quam tenetur
    earum voluptatem unde. Ipsum accusamus hic sed modi reiciendis soluta laborum possimus vitae molestiae dignissimos! Rerum quos, corporis deserunt culpa dolorem? Quaerat voluptatum modi incidunt velit tenetur voluptatibus porro inventore neque sit
    veniam. Dolores totam veritatis deleniti aut corporis laudantium sed molestiae autem dolorem quis, consectetur doloribus assumenda voluptates dicta vitae nulla! Repudiandae beatae architecto inventore eius vitae, unde ab iste eveniet eaque commodi
    pariatur.</p>
  <br /> <br /> 

  <h2><b>:checked</b> for Radio button</h2>
  <!-- checkbox sample -->
  <input type="radio" /> Do you want More Info
  <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Recusandae tempore minus corporis eum quasi. Assumenda ut debitis tempora ea distinctio quia, error, laudantium accusantium soluta numquam iure est alias sunt molestias dicta optio quam tenetur
    earum voluptatem unde. </p>
  <br /> <br />
  <h2><b>:checked</b> for Select Box</h2>
  <!-- select box sample -->
  <p style="display:block;">Selected option's background color will be change to green. </p> <br />
  <select name="" id="">
    <option value="">Option 1</option>
    <option value="">Option 2</option>
    <option value="">Option 3</option>
    <option value="">Option 4</option> 
  </select>
</div>
              
            
!

CSS

              
                /* demo styles */

@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,600,700,800);
body {
  background-color: #e2525c;
  padding: 50px;
  color: #fff;
  font-family: 'Open Sans', sans-serif;
  vertical-align: middle;
  line-height: 1.555;
}

p {
  margin-top: 20px;
  font-size: 14px;
  display: none;
}

h2 {
  font-size: 24px;
  margin-bottom: 30px;
  padding: 10px;
  background-color: #bd3e47;
}

b {
  font-weight: 600;
}

input {
  vertical-align: top;
  font-size: 18px;
  text-transform: uppercase;
  width: 20px;
  height: 20px;
}

select {
  width: 200px;
  height: 40px;
  font-size: 16px;
  font-weight: 600;
}
option {
  width: 200px;
  height: 40px;
  font-size: 16px;
  font-weight: 600;
}

/* close demo styles */


/* checkbox sample */

input[type=checkbox]:checked + p {
  display: block;
}


/* radio sample */

input[type=radio]:checked + p {
  display: block;
}


/* selectbox sample */
select option:checked {
  background-color: green;
  color: white;
}
              
            
!

JS

              
                
              
            
!
999px

Console