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.

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


    Хорошо, <a href=";bcolor=9050AA" target="_blank">сильный контраст (5.00)</a>:
    <a href="#" class="btn">Привет, я ссылка</a>
    <button class="btn">А я кнопка</button>
<div class="block">
    Плохо, <a href=";bcolor=BB99FF" target="_blank">слабый,
    недоступный контраст (2.30)</a>:
    <a href="#" class="btn btn-lowcontrast">Привет, я ссылка</a>
    <button class="btn btn-lowcontrast">А я кнопка</button>


                .btn {
  /* по-умолчанию для <button>, но пригодится для <a> */
  display: inline-block;
  text-align: center;
  text-decoration: none;

  /* создаём маленькие отступы, если кнопки перенесутся на две строки */
  margin: 2px 0;

  /* невидимая граница (понадобится для цвета при наведении/фокусе) */
  border: solid 1px transparent;
  border-radius: 4px;

  /* размер строится из текста и отступов (без width/height) */
  padding: 0.5em 1em;

  /* убедитесь, что достаточно контраста! */
  color: #ffffff;
  background-color: #9555af;

/* так делать плохо */
.btn-lowcontrast {
  color: #ffffff;
  background-color: #bb99ff;

/* Не относящиеся к примеру стили */
body {
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  align-content: center;
  min-height: 100%;
  max-width: 40rem;
  margin: 0 auto;
  padding: 0.5rem 1rem;
  font-family: system-ui, sans-serif;
  font-size: 90%;
  line-height: 1.35;
  color: black;
  background-color: #f8f6f4;