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

              
                <!DOCTYPE html>
<html>

<head></head>

<body>
  <h2>::first-letter</h2>
  <p class="fl">You can use the ::first-letter pseudo-element to add a special effect to the first character of a text!</p>
  
  <hr>

  <h2>::first-line</h2>
  <p class="fline">You can use ::first-line pseudo-elements to add a special effect to the first line of a text! You can use ::first-line pseudo-elements to add a special effect to the first line of a text!</p>
  <hr>

  <h2>::before</h2>
  <h1>This is a heading</h1>
  <p>The ::before pseudo-element inserts content before the content of an element.</p>

  <h1>This is a heading</h1>
  <hr>
  

  <h2>::after</h2>
  <h5>This is a heading</h5>
  <p>The ::after pseudo-element inserts content after the content of an element.</p>

  <h5>This is a heading</h5>
  <hr>

  <h2>::marker</h2>
  <ul>
    <li>Coffee</li>
    <li>Tea</li>
    <li>Milk</li>
  </ul>

  <ol>
    <li>First</li>
    <li>Second</li>
    <li>Third</li>
  </ol>
  <p>The ::marker pseudo-element selects the markers of list items.</p>
  <hr>

  <h2>::selection</h2>

  <h1>Select some text on this page:</h1>

  <p>This is a paragraph.</p>
  <div>This is some text in a div element.</div>

  <p><strong>Note:</strong> Firefox supports an alternative, the ::-moz-selection property.</p>
</body>

</html>
              
            
!

CSS

              
                .fl::first-letter {
  color: #ff0000;
  font-size: xx-large;
}

.fline::first-line {
  color: #0000ff;
  font-variant: small-caps;
}

h1::before {
  content: url(https://www.w3schools.com/css/smiley.gif);
}

h5::after {
  content: url(https://www.w3schools.com/css/smiley.gif);
}

::marker {
  color: red;
  font-size: 23px;
}

::-moz-selection {
  /* Code for Firefox */
  color: lightblue;
  background: #313131;
}

::selection {
  color: lightblue;
  background: #313131;
}

              
            
!

JS

              
                
              
            
!
999px

Console