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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

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


                <div class="container">
  <h1>Automatic Quotes</h1>
  <p>This is a test on a simple way to use the data-attribute to deligate a snippet of text to quickly and easily use as a blockquote or pullquote.<p>
  <p>This is a nice way to keep your HTML a bit more DRY. <span data-quote>DRY! DRY! DRY!</span> Boy it's late! It's like 4am. Why am I still awake? Surely I could've waited and done this in the morning.</p>
  <p>Anyways, there's two ways to achive this. Version 1: You can simply clone the 'span[data-quote]' element and add a class and then append or prepend it to the nth-child. Version 2 uses wrapInner() to create a blockquote around the text.</p>
  <p>You could go even further and create an extensive selection of attributes: data-blockquote, data-pullquote, data-left-quote, data-right-quote etc. Once you're css is right you could have unlimited options with ease.<p>


                @import "compass/css3";

@import url(;
@import url(;

*::after {
  -webkit-box-sizing: border-box;
     -moz-box-sizing: border-box;
          box-sizing: border-box;

body {
  background-color: hsl(190, 40, 50%);

.container {
  margin: 0 auto;
  max-width: 40em;
  text-align: justify;

h1 {
  font: {
    family: "Cinzel Decorative",Georgia, serif;
    size: 4em;
  text-align: center;

p {
  font-family: "Gudea", sans-serif;

// Version 1
.quote {
  font: {
      family: Georgia, serif;
      size: 2em;
      style: italic;
  // background-color: hsl(50, 50, 85%);
  color: white;
  float: left;
  text-align: right;
  margin-right: 0.5em;
  max-width: 9.5em;
  padding: 0.5em;

.quote::before {
  content: "\201C";

.quote::after {
  content: "\201D";

// Version 2
// TODO: style blockquote


                $(document).ready(function() {
  // Version 1
  // Version 2
   * More specific slection using 'nth' pseudo 
   * selector
   * Use wrapInner() to wrap the textnode in a 
   * traditional blockquote
  // $('span[data-quote]').clone().prependTo('p:nth-child(2)').wrapInner('<blockquote />');