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.


                <div class="container">
  <!-- Tab 1 -->
  <input type="radio" id="tab-link-1" name="tabset" checked>
  <label for="tab-link-1">Tab 1</label>
  <input type="radio" id="tab-link-2" name="tabset">
  <label for="tab-link-2">Tab 2</label>
  <input type="radio" id="tab-link-3" name="tabset">
  <label for="tab-link-3">Tab 3</label>
  <!-- Tab content -->
  <div class="tab-content">
    <section class="tab-panel" id="tab-1">
      <h2>Tab 1</h2>
      <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut tempor, velit et tempor molestie, urna purus fringilla neque, nec condimentum purus nibh eu tortor. Curabitur non maximus mi. Suspendisse cursus libero nisi, ac imperdiet purus malesuada vel. Cras maximus in quam vel sagittis. Sed ut cursus turpis. Mauris a ipsum congue, sagittis risus commodo, tincidunt mi. Sed mi ante, viverra et iaculis sollicitudin, malesuada vitae turpis. Proin nisl neque, semper a nisl et, dictum feugiat nulla.</p>
      <p>Praesent sit amet molestie nunc. In nec tellus cursus, malesuada urna quis, tristique nisl. Vivamus iaculis tempus libero. Mauris nec elit semper, volutpat dolor eu, gravida mauris. Maecenas sed ullamcorper justo. Cras sit amet massa augue. Nam posuere nec justo at auctor.</p>
    <section class="tab-panel" id="tab-2">
      <h2>Tab 2</h2>
      <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nec accumsan elit, et eleifend odio. Integer sed mi vel enim dapibus congue. Proin consequat augue sed tellus egestas gravida. Curabitur vel nibh sit amet metus semper rutrum. Etiam augue ex, aliquam sed convallis vitae, vulputate non diam. Aenean tempus diam in cursus interdum. Mauris tincidunt accumsan leo, eget mattis ex mattis eget.</p>
      <p>Aliquam ligula erat, tristique vitae orci eu, tristique semper velit. Suspendisse scelerisque et nisl quis convallis. Maecenas at libero ipsum. Quisque elementum metus id mauris pretium, bibendum auctor libero tincidunt. Cras dolor diam, faucibus vel massa eu, vestibulum bibendum lorem. Cras vel massa vitae ipsum dapibus imperdiet vel eu magna. Morbi ac augue non nibh ullamcorper.</p>
    <section class="tab-panel" id="tab-3">
      <h2>Tab 3</h2>
      <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec ultricies risus vel nibh malesuada, ut ultricies massa sagittis. Proin vestibulum bibendum velit, in congue neque eleifend eget. Vivamus quis turpis non odio tempus dapibus quis et ligula. Mauris molestie tincidunt tellus, sed interdum est egestas sed. Sed id ligula neque. Sed consequat venenatis metus a faucibus. Morbi mauris nulla, finibus at laoreet a, interdum sit amet dui. Cras convallis purus arcu, ut feugiat odio mattis vitae. Aliquam fringilla justo quis sagittis lobortis.</p>
      <p>Quisque suscipit pulvinar nunc, at auctor turpis. Nullam ex turpis, fringilla ut blandit vel, laoreet id turpis. Etiam velit ex, laoreet et felis eu, placerat tincidunt sem. Praesent ut ex ipsum. Suspendisse potenti. Quisque imperdiet lorem sit amet varius condimentum. Quisque id rhoncus nibh, vel semper velit. Class aptent taciti.</p>


                @import url(";300;400;500;600;700&family=Open+Sans:wght@300;400;500;600;700&display=swap");

*, *::before, *::after {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;

body {
  background-color: #fff;
  font-family: "Overpass", "Open Sans", Helvetica, sans-serif;
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.5em;
  color: #333;
  position: relative;

.container {
  max-width: 65em;
  margin: 30px;

.container > input[type="radio"] {
  position: absolute;
  left: -200vw;

.container > label {
  position: relative;
  display: inline-block;
  padding: 15px 15px 25px;
  border: 1px solid transparent;
  border-bottom: 0;
  cursor: pointer;
  font-weight: 600;

.container > label::after {
  content: "";
  position: absolute;
  left: 15px;
  bottom: 10px;
  width: 22px;
  height: 4px;
  background: #8d8d8d;

.container > label:hover, .container > input:focus + label {
  color: #06c;

.container > label:hover::after, .container > input:focus + label::after, .container > input:checked + label::after {
  background: #06c;

.container > input:checked + label {
  border-color: #ccc;
  border-bottom: 1px solid #fff;
  margin-bottom: -1px;

.tab-content {
  border-top: 1px solid #ccc;

.tab-content {
  padding: 30px 0;

/* The magic */
.container {
  display: none;

.container > input:first-child:checked ~ .tab-content >, .container > input:nth-child(3):checked ~ .tab-content >, .container > input:nth-child(5):checked ~ .tab-content > {
  display: block;