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

              
                <section class="catalog" aria-label="каталог ненужных товаров">
  <article class="item">
    <header>
      <p class="best">Бестселлер!</p>
      <h2>Единственная в мире эксклюзивная чудо-расческа для усов фирмы Abracadabra</h2>
    </header>
    <p>Пользуется заслуженной популярностью по всему миру с 1992 года. Продано свыше 9000 штук!</p>
    <p>Совместима со всеми операционными системами и знаками Зодиака!</p>
    <p>Подходит даже лысым!</p>
    <p>Всего за <s class="old-price">999</s> <mark class="price">998</mark> рублей!</p>
  </article>
  
  <article class="item">
    <header>
      <p class="new">Новинка!</p>
      <h2>Суперкактус</h2>
    </header>
    <p>Уникальное защитное устройство от вредного излучения мониторов, телевизоров, микроволновок, спутников-шпионов, АЭС, ЛЭП, НЛО, HAARP и всего остального, про что можно прочитать в интернете!</p>
    <p>100% натуральный продукт! Не содержит ГМО, асбеста и монооксида дигидрогена!</p>
    <p>Одобрено авторитетными экспертами — член-корреспондентами РАЕН (ксерокопия сертификата формата А3 прилагается)!</p>
    <p>Привлекательная цена <mark class="price">1599</mark> рублей!</p>
  </article>
  
  <article class="item">
    <header>
      <p class="action">Акция!</p>
      <h2>Абсолют Ничто</h2>
    </header>
    <p>Самый эзотерический и дзенский товар во всём интернете!</p>
    <p>Только для посвященных!</p>
    <p>Поставляется в уникальной оригинальной подарочной упаковке. Остерегайтесь подделок!</p>
    <p>Только первым трем покупателям — за <mark class="price">600</mark> рублей*!
      <p><small>*Кстати, двое уже купили. Третьим будешь?</small></p>
  </article>
  
  
</section>
              
            
!

CSS

              
                .catalog {
  font: .75em/1.25 sans-serif;
  display: flex;
  align-items: baseline;
}

.item {
  flex: 1;
  padding: .5em;
}

.item:hover {
  outline: 1px dashed #ccb;
}

.old-price, small {
  color: #888;
  font-size: .9em;
}
.price {
  color: red;
  background: none;
  font: bold 1.25em/1 sans-serif;
}

.best, .new, .action {
  font: .9em/1 sans-serif;
  text-align: right;
}
.best { color: green; }
.new { color: blue; }
.action { color: orange; }

h2 {
  font-size: 1.5em;
  margin: 1em 0 0;
  color: #666;
}

h2::after {
  content: '';
  display: block;
  margin: 0.5em 0 0;
  border-bottom: 2px solid rgba(255,0,0,.3);
}

header {
  display: inline-block;
  width: 100%;
}
              
            
!

JS

              
                
              
            
!
999px

Console