css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation


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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

              <section class="container">

  <div class="text-indent length">
    <h2>text-indent using length</h2>
      Alice was beginning to get very tired of sitting by her sister on the bank, and of having nothing to do: once or twice she had peeped into the book her sister was reading, but it had no pictures or conversations in it, &lsquo;and what is the use of a
      book,&rsquo; thought Alice &lsquo;without pictures or conversation?&rsquo;

  <div class="text-indent percentage">
    <h2>text-indent using percentage</h2>
      I had called upon my friend Sherlock Holmes upon the second morning after Christmas, with the intention of wishing him the compliments of the season. He was lounging upon the sofa in a purple dressing-gown, a pipe-rack within his reach upon the right,
      and a pile of crumpled morning papers, evidently newly studied, near at hand.

<p class="p">Demo by Antonietta Perna. <a href="http://www.sitepoint.com/css-properties-to-control-web-typography/" target="_blank">See article</a>.</p>
              * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;

body {
  background-color: #eee;
  font-family: Verdana, Arial, sans-serif;
  font-size: 100%;
  font-weight: lighter;
  line-height: 1.5;
  color: #444;

p {
  font-size: 1em;
  font-weight: 300;
  line-height: 1.5;
  color: 666;

@media screen and (min-width: 992px) {
  p {
    font-size: 1.125em;
    max-width: 90%;
    line-height: 1.8;

.container {
  max-width: 100%;
  min-width: 300px;
  margin: 0 auto;
  background-color: #9f1620;
  padding: 2em;

@media screen and (min-width: 768px) {
  .container {
    max-width: 60%;

.text-indent {
  background: #fff;
  padding: 2em;
  box-shadow: 0px 3px 2px #333;

.text-indent h2 {
  text-transform: uppercase;
  font-size: 1.4em;
  line-height: 1.2;
  margin-bottom: 0.5em;
  text-align: center;

.text-indent > p:first-letter {
  color: #9f1620;
  padding-right: .1em;
  font-size: 2em;
  font-weight: bold;
  line-height: 1.1;
  font-family: Georgia, serif;
  text-shadow: 0px 1px 1px #630e14;

.length p {
  text-indent: 2em;

.percentage p {
  text-indent: 6%;

.p {
  text-align: center;
  font-size: 13px;
  padding-top: 40px;
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................