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

              
                <main>
  <h1>Tables and Figures</h1>
  
  <figure>
    <img src="http://media.cinemasquid.com/blu-ray/titles/army-of-darkness/6903/screenshot-lrg-01.png" alt="">
    <figcaption>
      Alright you Primitive Screwheads, listen up! You see this? This... is my boomstick! The twelve-gauge double-barreled Remington. S-Mart's top of the line. You can find this in the sporting goods department. That's right, this sweet baby was made in Grand Rapids, Michigan. Retails for about a hundred and nine, ninety five. It's got a walnut stock, cobalt blue steel, and a hair trigger. That's right. Shop smart. Shop S-Mart. You got that?
    </figcaption>
  </figure>

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

  <h2>Figures</h2>
  
  <figure class="right">
    <img src="https://1.bp.blogspot.com/-RxjT89UHsC4/VKW6sWE2UwI/AAAAAAAAGdw/5zeS_fc1RW0/s1600/RingWarmer_150px_128c.gif" alt="Animation showing the Ring Warmer in action."><figcaption>
    Animation showing the Ring Warmer in action.
    </figcaption>
  </figure>
  
  <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>
    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>
  
  <figure class="left">
    <img src="https://4.bp.blogspot.com/-3cC0THj-mIY/VI5TOtr9HAI/AAAAAAAAGc8/Ej467d2kueA/s1600/Netscape1-about.gif" alt="Screen shot of the Netscape 1.0N browser information page." style="max-width:100%;height:auto;">
    <figcaption>
      Screen shot of the Netscape 1.0N browser information page.
    </figcaption>
</figure>
  
  <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>Tables and Tables in Figures</h2>
  
  <table>
    <colgroup>
      <col>
      <col>
      <col class="number">
    </colgroup>
    <thead>
      <tr>
        <th>Author</th>
        <th>Title</th>
        <th class="number">Year Published</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td>Homer</td>
        <td><em>Iliad</em></td>
        <td class="number">BC ~800</td>
      </tr>
      <tr>
        <td>Miguel De Cervantes</td>
        <td><em>The Ingenious Gentleman Don Quixote of La Mancha</em></td>
        <td class="number">AD 1605</td>
      </tr>
      <tr>
        <td>Mary Shelley</td>
        <td><em>Frankenstein; or, The Modern Prometheus</em></td>
        <td class="number">1818</td>
      </tr>
      <tr>
        <td>Herman Melville</td>
        <td><em>Moby-Dick; or, The Whale</em></td>
        <td class="number">1851</td>
      </tr>
      <tr>
        <td>F. Scott Fitzgerald</td>
        <td><em>The Great Gatsby</em></td>
        <td class="number">1925</td>
      </tr>
      <tr>
        <td>George Orwell</td>
        <td><em>Nineteen Eighty-Four</em></td>
        <td class="number">1948</td>
      </tr>
    </tbody>
  </table>
  
  <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>

  <figure>
    <table>
      <colgroup>
        <col>
        <col>
        <col class="number">
      </colgroup>
      <thead>
        <tr>
          <th>Author</th>
          <th>Title</th>
          <th class="number">Year Published</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td>Homer</td>
          <td><em>Iliad</em></td>
          <td class="number">BC ~800</td>
        </tr>
        <tr>
          <td>Miguel De Cervantes</td>
          <td><em>The Ingenious Gentleman Don Quixote of La Mancha</em></td>
          <td class="number">AD 1605</td>
        </tr>
        <tr>
          <td>Mary Shelley</td>
          <td><em>Frankenstein; or, The Modern Prometheus</em></td>
          <td class="number">1818</td>
        </tr>
        <tr>
          <td>Herman Melville</td>
          <td><em>Moby-Dick; or, The Whale</em></td>
          <td class="number">1851</td>
        </tr>
        <tr>
          <td>F. Scott Fitzgerald</td>
          <td><em>The Great Gatsby</em></td>
          <td class="number">1925</td>
        </tr>
        <tr>
          <td>George Orwell</td>
          <td><em>Nineteen Eighty-Four</em></td>
          <td class="number">1948</td>
        </tr>
      </tbody>
    </table>
    <figcaption>
      This is a list of books that I probably should have read, some of which I have read, but not all of which have I read.
    </figcaption>
  </figure>
  
  <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>
  
  <figure class="left">
    <table>
      <colgroup>
        <col>
        <col>
        <col class="number">
      </colgroup>
      <thead>
        <tr>
          <th>Author</th>
          <th>Title</th>
          <th class="number">Year Published</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td>Homer</td>
          <td><em>Iliad</em></td>
          <td class="number">BC ~800</td>
        </tr>
        <tr>
          <td>Miguel De Cervantes</td>
          <td><em>The Ingenious Gentleman Don Quixote of La Mancha</em></td>
          <td class="number">AD 1605</td>
        </tr>
        <tr>
          <td>Mary Shelley</td>
          <td><em>Frankenstein; or, The Modern Prometheus</em></td>
          <td class="number">1818</td>
        </tr>
        <tr>
          <td>Herman Melville</td>
          <td><em>Moby-Dick; or, The Whale</em></td>
          <td class="number">1851</td>
        </tr>
        <tr>
          <td>F. Scott Fitzgerald</td>
          <td><em>The Great Gatsby</em></td>
          <td class="number">1925</td>
        </tr>
        <tr>
          <td>George Orwell</td>
          <td><em>Nineteen Eighty-Four</em></td>
          <td class="number">1948</td>
        </tr>
      </tbody>
    </table>
    <figcaption>
      This is a list of books that I probably should have read, some of which I have read, but not all of which have I read.
    </figcaption>
  </figure>
  
  <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>
  
  <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>
  
</main>
              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=Lato:400,700);
@import url(https://fonts.googleapis.com/css?family=Linden+Hill);

body {
  background-color: #6D695C;
  background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAACVBMVEUAAAAAAAAAAACDY+nAAAAAA3RSTlMmDQBzGIDBAAAAG0lEQVR42uXIIQEAAADCMHj/0NdkQMws0HEeAqvwAUGJthrXAAAAAElFTkSuQmCC);
  font-size: 100%;
  color: #fff;
  font-family: Lato, Arial, sans-serif;
  padding: 0;
  margin: 0;
  line-height: 1.4;
}

main {
  width: 80%;
  margin: 1em auto;
  padding: 1em 2em;
  color: #000;
  background-color: rgba(255,255,255,.25);
  border: .07em solid rgba(0,0,0,.5);
  border-radius: .5em;
}

main::after {
  content: "";
  display: block;
  clear: both;
}

a {
  color: #009;
}

h1, h2, h3 {
  font-weight: normal;
  font-family: 'Linden Hill', serif;
  margin: .5em 0 0 0;
  padding: 0;
  font-size: 200%;
}

h2 {
  font-size: 170%;
}

img {
  max-width: 100%;
  height: auto;
}

figure {
  margin: 1em 0;
  text-align: center;
  overflow: auto;
}

figure.right, figure.left {
  /*border: 1px dotted #f00;*/
  border-top: .1em solid #000;
  border-bottom: .1em solid #000;
  padding: 1em 0;
  width: 30%;
}

figure.right {
  float: right;
  margin-left: 2em;
}

figure.left {
  float: left;
  margin-right: 2em;
}

figcaption {
  /*border: 1px solid #f00;*/
  padding: .5em .5em 0 .5em;
  font-style: italic;
  font-family: 'Linden Hill', serif;
}

figure.right figcaption, figure.left figcaption {
  padding-left: 0;
  padding-right: 0;
}

table {
  /*border: 1px dotted #00f;*/
  margin: 1em 0;
  border-collapse: collapse;
}

th, td {
  padding: .25em .5em;
  /*border: 1px dotted #0f0;*/
  vertical-align: text-top;
  text-align: left;
}

tr:nth-child(even) {
  background-color: rgba(255,255,255,.25);
}

tr:nth-child(odd) {
  background-color: rgba(0,0,0,.1);
}

th {
  vertical-align: bottom;
  background-color: rgba(0,0,0,.5);
  color: #fff;
  font-weight: bold;
}

td.right, th.right, td.number, th.number/*, col.number || td, col.right || td  CSS4 table col selector */ {
  text-align: right;
}

figure table {
  width: 100%;
  max-width: 100%;
}

@media (min-width:50em) {
  
  body {
    background-color: #5C6D69;
  }
  
  figure.right, figure.left {
    padding: 1em .5em;
  }
  
  figcaption {
    padding-left: 1em;
    padding-right: 1em;
  }
  
}

@media (min-width:70em) {
  
  body {
    background-color: #695C6D;
  }
  
  figure.right, figure.left {
    padding: 1em;
  }
  
  figcaption {
    padding-left: 2em;
    padding-right: 2em;
  }
  
}

              
            
!

JS

              
                
              
            
!
999px

Console