Pen Settings

HTML

CSS

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.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

Behavior

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.

HTML

              
                <section class="colors-and-type">
  <div class="colors">
    <dl class="samples-set colors__list">
      <dt class="samples-set__sample colors__color colors__color_color_red">rgba(255, 0, 0, 1)</dt>
      <dd class="samples-set__description colors__description">Red <span class="colors__code">#F00</span></dd>
      <dt class="samples-set__sample colors__color colors__color_color_purple">rgba(188, 156, 255, 1)</dt>
      <dd class="samples-set__description colors__description">Purple <span class="colors__code">#BC9CFF</span></dd>
      <dt class="samples-set__sample colors__color colors__color_color_green">rgba(111, 207, 151, 1)</dt>
      <dd class="samples-set__description colors__description">Green <span class="colors__code">#6FCF97</span></dd>
    </dl>
  </div>
  <div class="type">
    <dl class="samples-set type__list">
      <dt class="samples-set__sample type__name type__name_name_h1">H1</dt>
      <dd class="samples-set__description type__description">Heading level 1</dd>
      <dt class="samples-set__sample type__name type__name_name_h2">H2</dt>
      <dd class="samples-set__description type__description">Heading level 2</dd>
      <dt class="samples-set__sample type__name type__name_name_h3">H3</dt>
      <dd class="samples-set__description type__description">Heading level 3</dd>
    </dl>
  </div>
</section>
              
            
!

CSS

              
                .colors-and-type {
  display: flex;
  justify-content: space-around;
  width: 95vw;
  margin: auto;
}

.samples-set {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: .5em 1em;
  margin: 0;
}

.samples-set__sample {
  margin: 0;
  font-size: 1.2em;
  line-height: 1.3;
  font-weight: bold;
}

.samples-set__description {
  margin: 0;
  font-size: 1em;
  line-height: 1.3;
  font-weight: normal;
}

.colors__color {
  width: 50px;
  height: 50px;
  font-size: 0;
  border-radius: 5px;
}

.colors__color_color_red {
  background-color: #ff0000;
}

.colors__color_color_purple {
  background-color: #bc9cff;
}

.colors__color_color_green {
  background-color: #6fcf97;
}

.colors__description {
  display: flex;
  flex-direction: column;
}

.colors__code {
  font-weight: bold;
}

.type__name {
  font-weight: normal;
  color: rgba(0, 0, 0, 0.8);
}

.type__name_name_h1 {
    font-size: 1.6rem;
}

.type__name_name_h2 {
  font-size: 1.4rem;
}

.type__description {
  font-weight: bold;
}
              
            
!

JS

              
                
              
            
!
999px

Console