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.

              <h1>Demo: Uniquely Labeling Fields in Table v2</h1>

  <caption>Books I May or May Not Have Read</caption>
    <th id="ColFlag">Flag</th>
    <th id="ColAuthor">Author</th>
    <th id="ColTitle">Title</th>
    <th id="ColYear">Year</th>
    <th id="ColISBN13">ISBN-13</th>
    <th id="ColClaimed">Claimed by</th>
    <th id="ColRemove">Remove</th>
    <td><input type="checkbox" id="f01" aria-labelledby="Row01 ColFlag"></td>
    <th scope="row" id="Row01">Miguel De Cervantes</th>
    <td>The Ingenious Gentleman Don Quixote of La Mancha</td>
    <td><input type="text" id="c01" aria-labelledby="Row01 ColClaimed"></td>
    <td><button type="button" id="b01" aria-labelledby="b01 Row01">Remove</button></td>
    <td><input type="checkbox" id="f02" aria-labelledby="Row02 ColFlag"></td>
    <th scope="row" id="Row02">Mary Shelley</th>
    <td>Frankenstein; or, The Modern Prometheus</td>
    <td><input type="text" id="c02" aria-labelledby="Row02 ColClaimed"></td>
    <td><button type="button" id="b02" aria-labelledby="b02 Row02">Remove</button></td>
    <td><input type="checkbox" id="f03" aria-labelledby="Row03 ColFlag"></td>
    <th scope="row" id="Row03">Herman Melville</th>
    <td>Moby-Dick; or, The Whale</td>
    <td><input type="text" id="c03" aria-labelledby="Row03 ColClaimed"></td>
    <td><button type="button" id="b03" aria-labelledby="b03 Row03">Remove</button></td>
    <td><input type="checkbox" id="f04" aria-labelledby="Row04 ColFlag"></td>
    <th scope="row" id="Row04">Emma Dorothy Eliza Nevitte Southworth</th>
    <td>The Hidden Hand</td>
    <td><input type="text" id="c04" aria-labelledby="Row04 ColClaimed"></td>
    <td><button type="button" id="b04" aria-labelledby="b04 Row04">Remove</button></td>
    <td><input type="checkbox" id="f05" aria-labelledby="Row05 ColFlag"></td>
    <th scope="row" id="Row05">F. Scott Fitzgerald</th>
    <td>The Great Gatsby</td>
    <td><input type="text" id="c05" aria-labelledby="Row05 ColClaimed"></td>
    <td><button type="button" id="b05" aria-labelledby="b05 Row05">Remove</button></td>
    <td><input type="checkbox" id="f06" aria-labelledby="Row06 ColFlag"></td>
    <th scope="row" id="Row06">George Orwell</th>
    <td>Nineteen Eighty-Four</td>
    <td><input type="text" id="c06" aria-labelledby="Row06 ColClaimed"></td>
    <td><button type="button" id="b06" aria-labelledby="b06 Row06">Remove</button></td>

  This is used in my blog post <a href="">Uniquely Labeling Fields in a Table</a>.
              body {
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto,
    Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  line-height: 1.4;
  color: #333;
  background-color: #eee;

table {
  margin: 1em 0;
  border-collapse: collapse;
  border: 0.1em solid rgba(0, 0, 0, 0.1);

caption {
  text-align: left;
  font-style: italic;
  padding: 0.25em 0.5em 0.5em 0.5em;

td {
  padding: 0.25em 0.5em 0.25em 1em;
  vertical-align: text-top;
  text-align: left;
  text-indent: -0.5em;

th {
  vertical-align: bottom;
  background-color: rgba(0, 0, 0, 0.1);

th[scope=row] {
  vertical-align: top;

tr:nth-child(even) {
  background-color: rgba(0, 0, 0, 0.05);

tr:nth-child(odd) {
  background-color: rgba(255, 255, 255, 0.05);

td:nth-of-type(3) {
  font-style: italic;

td:nth-of-type(4) {
  text-align: right;

table td > input[type=text], #Sample + table td > button {
  font: inherit;
  border: .1em solid #666;
  width: 7em;
🕑 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.