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 CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

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>
    <a href="#">Header link</a>
    <a href="#">Header link</a>
    <a href="#">Header link</a>
  <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>
              :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;

main {
  padding: 2em;

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

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

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.');

Loading ..................