cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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. 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.

Quick-add: + add another resource

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.

Quick-add: + add another resource

Code Indentation

     

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.

            
              <header><h1>Site Title</h1>
  <button>Header Button</button>
  <button>Header Button</button>
  <nav>
    <a href="#">Header link</a>
    <a href="#">Header link</a>
    <a href="#">Header link</a>
  </nav>
</header>
<main>
  <p>Donec id elit non mi porta <a href="#">gravida</a> at eget metus. Fusce, fermentum massa amet. <a href="#">Etiam porta</a> sem malesuada magna mollis euismod. <a href="#">Donec</a> sed odio dui.</p>
  <button>Content Button</button>
  <button>Content Button</button>
</main>
            
          
!
            
              :root {
  --primaryColor: hsl(165, 60%, 40%);
}

a {
  color: var(--linkColor, var(--primaryColor));
}

button {  
  background: var(--Button-backgroundColor, var(--primaryColor));
  border: 1px solid var(--Button-borderColor, var(--primaryColor));
  border-radius: .5em;
  color: var(--Button-color, white);
  font-size: .9em;
  padding: .75em 2em;
  text-align: center;
}

header {
  --Button-backgroundColor: transparent;
  --Button-borderColor: currentColor;
  --Button-color: currentColor;
  --linkColor: currentColor;  
  background: #333;
  color: #fff;
}

/* The styles below aren't relevant to the demo. */

body {
  color: #333;
  font: 1em/1.25 'Helvetica Neue', sans-serif;
  text-align: center;
}

header,
main {
  padding: 2em;
}

h1 {
  font-size: 4em;
  font-weight: 400;
  margin: 0 0 .25em;
}

p {
  max-width: 36em;
  margin: 0 auto 1em;
}

button,
nav > a {
  display: inline-block;
  margin: .75em;
}
            
          
!
            
              function supportsCSSCustomProperties() {
  var div = document.createElement('div');
  div.style.setProperty('--width', '1%');
  return div.style.getPropertyValue('--width') == '1%';
}

if (!supportsCSSCustomProperties()) {
  alert('Sorry! Your browser does not support CSS Custom Properties.');
}

            
          
!
999px
Loading ..................

Console