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

              
                <!-- http://html5doctor.com/cite-and-blockquote-reloaded/ -->

<main>
  <h1>Blockquotes</h1>

  <blockquote class="right">
    <p>
      <a href="http://www.w3.org/TR/html5/">Previously in HTML5</a> it is [sic] was not conforming to include citations within <code>blockquote</code> elements. Now it is, as long as the citation content is within a <code>cite</code> or <code>footer</code> element.
    </p>
    <footer>
      <cite><a href="http://html5doctor.com/cite-and-blockquote-reloaded/">cite and blockquote – reloaded</a>, HTML5 Doctor, Steve Faulkner</cite>
    </footer>
  </blockquote>

  <p>
    <strong>Accounting for the pattern where a <code>footer</code> is used and not. Also accounting for floated blocks (to make sure the <code>cite</code> is spaced appropriately for a narrower display). Inline and Twitter options below all the nonsense text.</strong>
  </p>

  <p>
    Cupcake ipsum dolor. Sit amet jelly-o cake cookie donut muffin bear claw. Cookie tiramisu jelly icing cheesecake jujubes. Jelly beans icing pastry chocolate. Pudding sesame snaps chupa chups liquorice marzipan gummies. Cupcake applicake toffee.
  </p>

  <p>
    Chocolate bar gingerbread macaroon lollipop pie icing. Dragée jelly-o jujubes cheesecake cake pie topping sweet roll. Candy canes pudding candy chocolate bar bonbon. Jelly-o dragée brownie pastry candy canes marzipan powder. Fruitcake sesame snaps liquorice oat cake danish chocolate sweet roll. Donut cheesecake cookie chocolate cake topping. Bear claw toffee halvah apple pie chocolate bar danish muffin. Unerdwear.com soufflé bonbon macaroon pie.
  </p>

  <p>
    Gummies croissant cookie jujubes. Bonbon pudding cookie. Dragée bear claw cheesecake. Bear claw chocolate chocolate cake applicake tootsie roll. Gummi bears cupcake tart halvah tootsie roll. Topping soufflé sesame snaps pastry gummi bears pie. Gummies pastry danish lollipop. Tart chupa chups dessert.
  </p>

  <blockquote>
    <p>
      <a href="http://www.w3.org/TR/html5/">Previously in HTML5</a> it is [sic] was not conforming to include citations within <code>blockquote</code> elements. Now it is, as long as the citation content is within a <code>cite</code> or <code>footer</code> element.
    </p>
    <footer>
      <cite><a href="http://html5doctor.com/cite-and-blockquote-reloaded/">cite and blockquote – reloaded</a>, HTML5 Doctor, Steve Faulkner</cite>
    </footer>
  </blockquote>

  <p>
    Soufflé soufflé bear claw sweet cookie topping gummies. Marshmallow chupa chups cake sweet applicake chupa chups candy canes cake halvah. Toffee jelly-o toffee halvah candy canes gummi bears. Jelly-o donut danish oat cake fruitcake chupa chups. Dragée apple pie dragée fruitcake jelly macaroon pastry muffin. Gummi bears chocolate macaroon pastry. Jujubes lollipop chupa chups carrot cake pastry chocolate cake toffee.
  </p>

  <blockquote>
    <ul>
      <li>Toffee jelly-o toffee</li>
      <li>halvah candy canes gummi bears</li>
      <li>Jelly-o donut danish</li>
      <li>oat cake fruitcake chupa chups</li>
    </ul>
  </blockquote>

  <p>
    Liquorice powder icing. Cheesecake sweet cheesecake powder jelly gummi bears. Tootsie roll apple pie pie apple pie liquorice. Jelly wafer sugar plum. Bonbon sesame snaps donut. Macaroon lemon drops apple pie fruitcake cupcake gummies biscuit chupa chups croissant. Tootsie roll chocolate cake cheesecake jujubes gummies chocolate bar caramels. Chocolate cake brownie sesame snaps pudding ice cream cookie icing candy halvah.
  </p>

  <blockquote class="left">
    <p>
      Donut donut bear claw oat cake biscuit candy <em>canes tart</em> unerdwear.com. <i>Sweet jelly-o</i> cotton candy liquorice gingerbread carrot cake.
    </p>
    <footer>
      <cite>Xenu Xenu the Something or Other or Other or Other or Other or Other or Other or Other or Other or Other or Otheror Other or Other or Other or Other or Other or Other or Other</cite>
    </footer>
  </blockquote>

  <p>
    Cupcake ipsum dolor. Sit amet jelly-o cake cookie donut muffin bear claw. Cookie tiramisu jelly icing cheesecake jujubes. Jelly beans icing pastry chocolate. Pudding sesame snaps chupa chups liquorice marzipan gummies. Cupcake applicake toffee.
  </p>

  <p>
    Chocolate bar gingerbread macaroon lollipop pie icing. Dragée jelly-o jujubes cheesecake cake pie topping sweet roll. Candy canes pudding candy chocolate bar bonbon. Jelly-o dragée brownie pastry candy canes marzipan powder. Fruitcake sesame snaps liquorice oat cake danish chocolate sweet roll. Donut cheesecake cookie chocolate cake topping. Bear claw toffee halvah apple pie chocolate bar danish muffin. Unerdwear.com soufflé bonbon macaroon pie.
  </p>

  <p>
    Gummies croissant cookie jujubes. Bonbon pudding cookie. Dragée bear claw cheesecake. Bear claw chocolate chocolate cake applicake tootsie roll. Gummi bears cupcake tart halvah tootsie roll. Topping soufflé sesame snaps pastry gummi bears pie. Gummies pastry danish lollipop. Tart chupa chups dessert.
  </p>

  <p>
    Cupcake ipsum dolor. Sit amet jelly-o cake cookie donut muffin bear claw. Cookie tiramisu jelly icing cheesecake jujubes. Jelly beans icing pastry chocolate. Pudding sesame snaps chupa chups liquorice marzipan gummies. Cupcake applicake toffee.
  </p>

  <p>
    Cupcake ipsum dolor. Sit amet jelly-o cake cookie donut muffin bear claw. Cookie tiramisu jelly icing cheesecake jujubes. Jelly beans icing pastry chocolate. Pudding sesame snaps chupa chups liquorice marzipan gummies. Cupcake applicake toffee.
  </p>

  <p>
    Chocolate bar gingerbread macaroon lollipop pie icing. Dragée jelly-o jujubes cheesecake cake pie topping sweet roll. Candy canes pudding candy chocolate bar bonbon. Jelly-o dragée brownie pastry candy canes marzipan powder. Fruitcake sesame snaps liquorice oat cake danish chocolate sweet roll. Donut cheesecake cookie chocolate cake topping. Bear claw toffee halvah apple pie chocolate bar danish muffin. Unerdwear.com soufflé bonbon macaroon pie.
  </p>

  <h2>Inline Quotes</h2>

  <p>
    Cupcake ipsum dolor. Sit amet jelly-o cake cookie donut muffin bear claw. Cookie tiramisu jelly icing cheesecake jujubes. <q>Jelly beans icing pastry chocolate.</q> Pudding sesame snaps chupa chups liquorice marzipan gummies. Cupcake applicake toffee.
  </p>

  <h2>Tweets</h2>

  <p>
    <strong>Tweets don't use a <code>footer</code>/<code>cite</code> pattern, so I opt to override the styles to match the <code>footer</code>/<code>cite</code> and then re-create the styles on the sole <code>p</code>. It's a mess, but it can work. This is to address cases where I don't want Twitter's script firing to format the tweet, or for users with connection woes.</strong>
  </p>

<blockquote class="twitter-tweet" lang="en"><p>Realizing my paper crown from Christmas poppers is as temporary as my shave cream beard. <a href="http://t.co/uGideOUzZg">http://t.co/uGideOUzZg</a></p>&mdash; Adrian Roselli (@aardrian) <a href="https://twitter.com/aardrian/status/550723880919527425">January 1, 2015</a></blockquote>

  <p>
    Cupcake ipsum dolor. Sit amet jelly-o cake cookie donut muffin bear claw. Cookie tiramisu jelly icing cheesecake jujubes. Jelly beans icing pastry chocolate. Pudding sesame snaps chupa chups liquorice marzipan gummies. Cupcake applicake toffee.
  </p>

<blockquote class="twitter-tweet left" lang="en"><p>Alt: movie theater marquee: &quot;Jaws 19&quot; by Max Spielberg.&#10;RT <a href="https://twitter.com/NorthParkTheatr">@NorthParkTheatr</a>: No hoverboarding in the theatre, please! <a href="http://t.co/3e1OGuNfEl">pic.twitter.com/3e1OGuNfEl</a></p>&mdash; Adrian Roselli (@aardrian) <a href="https://twitter.com/aardrian/status/550644586025324544">January 1, 2015</a></blockquote>

  <p>
    Cupcake ipsum dolor. Sit amet jelly-o cake cookie donut muffin bear claw. Cookie tiramisu jelly icing cheesecake jujubes. Jelly beans icing pastry chocolate. Pudding sesame snaps chupa chups liquorice marzipan gummies. Cupcake applicake toffee.
  </p>

<blockquote class="twitter-tweet right" lang="en"><p>My top 2014 blog post: &quot;So You Think You’ve Built a Good Infinite Scroll&quot; <a href="http://t.co/aC51uupniv">http://t.co/aC51uupniv</a></p>&mdash; Adrian Roselli (@aardrian) <a href="https://twitter.com/aardrian/status/550503497024933888">January 1, 2015</a></blockquote>

  <p>
    Chocolate bar gingerbread macaroon lollipop pie icing. Dragée jelly-o jujubes cheesecake cake pie topping sweet roll. Candy canes pudding candy chocolate bar bonbon. Jelly-o dragée brownie pastry candy canes marzipan powder. Fruitcake sesame snaps liquorice oat cake danish chocolate sweet roll. Donut cheesecake cookie chocolate cake topping. Bear claw toffee halvah apple pie chocolate bar danish muffin. Unerdwear.com soufflé bonbon macaroon pie.
  </p>

  <p>
    Gummies croissant cookie jujubes. Bonbon pudding cookie. Dragée bear claw cheesecake. Bear claw chocolate chocolate cake applicake tootsie roll. Gummi bears cupcake tart halvah tootsie roll. Topping soufflé sesame snaps pastry gummi bears pie. Gummies pastry danish lollipop. Tart chupa chups dessert.
  </p>
</main>
              
            
!

CSS

              
                /* Relies on solid background color for content */

@import url(https://fonts.googleapis.com/css?family=Oswald);
@import url(https://fonts.googleapis.com/css?family=Merriweather:400,700,700italic,400italic);

body {
  font-family: Tahoma, Arial, Helvetica, sans-serif;
  line-height: 1.7;
  font-size: 100%;
  background-color: #ccc;
}

main {
  margin: 0 2em;
}

q {
  font-family: Merriweather, serif;
}

q::before {
  content: "\201C";
}

q::after {
  content: "\201D";
}

blockquote, blockquote.twitter-tweet p {
  box-sizing: border-box;
  font-family: Merriweather, serif;
  font-style: italic;
  font-size: 1.25em;
  color: #444;
  margin: 1.5em 2em;
  padding: 0;
  border-top: .07em solid rgba(0,0,0,.5);
  border-bottom: .07em solid rgba(0,0,0,.5);
  /*border-radius: 1.5em 0 0 0;*/
}

blockquote.twitter-tweet {
  overflow: hidden;
}

blockquote i, blockquote em, blockquote code, blockquote cite {
  font-style: normal;
}

blockquote.right, blockquote.left {
  width: 33%;
}

blockquote.right {
  margin: 0 1em 1em 2em;
  float: right;
}

blockquote.twitter-tweet.right {
  margin-right: 0;
  padding-left: 5em;
}

blockquote.left {
  margin: 0 2em 1em 1em;
  float: left;
}

blockquote.twitter-tweet.left {
  padding-left: 4.5em;
}

blockquote footer, blockquote.twitter-tweet {
  /*font-size: 65%;*/
  font-family: Arial,Oswald;
  font-style: normal;
  /*text-align: right;*/
  border-top: .07em solid rgba(0,0,0,.5);
  border-bottom: .1em solid #ccc; /* Must match content area background color */
  padding: .5em 0 0 6.5em;
  margin: 0 0 -.1em 0;
  /*text-indent: 9em;*/
  position: relative;
  line-height: 1.1;
}

blockquote.right footer, blockquote.left footer {
  padding-left: 2em;
}

blockquote footer cite {
  font-size: 65%;
  font-family: Oswald;
}

blockquote footer cite::before, blockquote.twitter-tweet p::after {
  /*content: "\2014 ";*/
  content: "";
  display: block;
  width: 1em;
  height: 1em;
  position: absolute;
  top: -.55em;
  left: 8em;
  border-bottom: .1em solid rgba(0,0,0,.5);
  border-right: .1em solid rgba(0,0,0,.5);
  transform: rotate(45deg);
  background-color: #ccc; /* Must match content area background color */
}

blockquote.right footer cite::before, blockquote.left footer cite::before {
  left: 1em;
}

blockquote.twitter-tweet {
  border-bottom: none;
  border-top: none;
  font-size: 85%;
  font-family: Oswald;
  /*border: 1px dotted #f00;*/
}

blockquote.twitter-tweet p {
  position: relative;
  font-size: 150%;
  margin: 0 2em 1em -2.25em;
  padding: 1em 0;
  border-bottom: .07em solid rgba(0,0,0,.5);
  line-height: 1.7;
}

blockquote.twitter-tweet p::after {
  top: auto;
  bottom: -.45em;
  left: 2em;
  width: .75em;
  height: .75em;
  border-bottom: .07em solid rgba(0,0,0,.5);
  border-right: .07em solid rgba(0,0,0,.5);
}

blockquote.twitter-tweet.right p::after, blockquote.twitter-tweet.left p::after {
  left: 1em;
}
              
            
!

JS

              
                
              
            
!
999px

Console