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


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.


                <header id="logo">
  <h1>The Best of the best</h1>

<main id="main">
  <article id="art1">
    <h2>Article 1</h2>
    <p>Phasellus magna. In hac habitasse platea dictumst. Curabitur at lacus ac velit ornare lobortis. Curabitur a felis in nunc fringilla tristique. Morbi mattis ullamcorper velit. Phasellus gravida semper nisi. Nullam vel sem. Pellentesque libero tortor,
      tincidunt et, tincidunt eget, semper nec, quam. </p>

  <article id="art1">
    <h2>Article 2</h2>
    <p>Etiam sollicitudin, ipsum eu pulvinar rutrum, tellus ipsum laoreet sapien, quis venenatis ante odio sit amet eros. Proin magna. Duis vel nibh at velit scelerisque suscipit. Curabitur turpis. Vestibulum suscipit nulla quis orci. Fusce ac felis sit
      amet ligula pharetra condimentum.</p>

<footer id="copyright">
  <span>Copyright 2017</span>
<!-- Нужно нажать чтобы к странице применились стиливые свойства  -->
<button onclick="refreshPage()">Click me for refresh this page</button>


                /* Стиль только для кнопки всё остальное в JS */
button {
  padding: 10px;
  margin: 20px;


function refreshPage() {
  var header = document.getElementById("logo");
  var footer = document.getElementById("copyright");
  var main = document.getElementById("main");
  //все статьи в MAIN(поиск без ID)
  var articles = main.getElementsByTagName("article");
  var ps = document.getElementsByTagName("p");//Найдём все абзацы в DOCUMENT
  /* Работа с абзацами */
  var p;
  for(var i=0; i < ps.length; ++i) {
    p = ps[i]; = "capitalize";//каждое слово с заглавной буквы
  /* Статьи на сайти */
  var art;
  for(var j=0; j < articles.length; ++j) {
    art = articles[j]; = "33%"; = "thin solid rgba(0,0,0, 0.3)"; = "5vw";
  /* Добавим стиль для заголовка */ = "monospace"; = "18px"; = "0 5px 7px rgba(0,0,0, 0.5)"; = "100px";
  // = "inline-block"; = "25px";
  /* Сделаем FLEX контейнер */ = "flex"; = "space-around";
  /* Улучшим подвал */ = "0.6rem"; = "600"; = "center"; = "hsl(35, 50%, 70%)";