Pen Settings

HTML

CSS

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

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

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.

HTML

              
                <h1>Tables with Assorted Display Properties</h1>

  <table>
    <caption>Regular Table</caption>
    <thead>
      <tr>
        <th>Author</th>
        <th>Title</th>
        <th>Year</th>
        <th>ISBN-13</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td>Miguel De Cervantes</td>
        <td>The Ingenious Gentleman Don Quixote of La Mancha</td>
        <td>1605</td>
        <td>9783125798502</td>
      </tr>
      <tr>
        <td>Gabrielle-Suzanne Barbot de Villeneuve</td>
        <td>La Belle et la Bête</td>
        <td>1740</td>
        <td>9781910880067</td>
      </tr>
      <tr>
        <td>Sir Isaac Newton</td>
        <td>The Method of Fluxions and Infinite Series: With Its Application to the Geometry of Curve-lines</td>
        <td>1763</td>
        <td>9781330454862</td>
      </tr>
      <tr>
        <td>Mary Shelley</td>
        <td>Frankenstein; or, The Modern Prometheus</td>
        <td>1818</td>
        <td>9781530278442</td>
      </tr>
      <tr>
        <td>Herman Melville</td>
        <td>Moby-Dick; or, The Whale</td>
        <td>1851</td>
        <td>9781530697908</td>
      </tr>
      <tr>
        <td>Emma Dorothy Eliza Nevitte Southworth</td>
        <td>The Hidden Hand</td>
        <td>1888</td>
        <td>9780813512969</td>
      </tr>
      <tr>
        <td>F. Scott Fitzgerald</td>
        <td>The Great Gatsby</td>
        <td>1925</td>
        <td>9780743273565</td>
      </tr>
      <tr>
        <td>George Orwell</td>
        <td>Nineteen Eighty-Four</td>
        <td>1948</td>
        <td>9780451524935</td>
      </tr>
      <tr>
        <td>Nnedi Okorafor</td>
        <td>Who Fears Death</td>
        <td>2010</td>
        <td>9780756406691</td>
      </tr>
    </tbody>
  </table>



  <table class="flex">
    <caption>Table with Flex</caption>
    <thead>
      <tr>
        <th>Author</th>
        <th>Title</th>
        <th>Year</th>
        <th>ISBN-13</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td>Miguel De Cervantes</td>
        <td>The Ingenious Gentleman Don Quixote of La Mancha</td>
        <td>1605</td>
        <td>9783125798502</td>
      </tr>
      <tr>
        <td>Gabrielle-Suzanne Barbot de Villeneuve</td>
        <td>La Belle et la Bête</td>
        <td>1740</td>
        <td>9781910880067</td>
      </tr>
      <tr>
        <td>Sir Isaac Newton</td>
        <td>The Method of Fluxions and Infinite Series: With Its Application to the Geometry of Curve-lines</td>
        <td>1763</td>
        <td>9781330454862</td>
      </tr>
      <tr>
        <td>Mary Shelley</td>
        <td>Frankenstein; or, The Modern Prometheus</td>
        <td>1818</td>
        <td>9781530278442</td>
      </tr>
      <tr>
        <td>Herman Melville</td>
        <td>Moby-Dick; or, The Whale</td>
        <td>1851</td>
        <td>9781530697908</td>
      </tr>
      <tr>
        <td>Emma Dorothy Eliza Nevitte Southworth</td>
        <td>The Hidden Hand</td>
        <td>1888</td>
        <td>9780813512969</td>
      </tr>
      <tr>
        <td>F. Scott Fitzgerald</td>
        <td>The Great Gatsby</td>
        <td>1925</td>
        <td>9780743273565</td>
      </tr>
      <tr>
        <td>George Orwell</td>
        <td>Nineteen Eighty-Four</td>
        <td>1948</td>
        <td>9780451524935</td>
      </tr>
      <tr>
        <td>Nnedi Okorafor</td>
        <td>Who Fears Death</td>
        <td>2010</td>
        <td>9780756406691</td>
      </tr>
    </tbody>
  </table>



  <table class="grid">
    <caption>Table with Grid</caption>
    <thead>
      <tr>
        <th>Author</th>
        <th>Title</th>
        <th>Year</th>
        <th>ISBN-13</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td>Miguel De Cervantes</td>
        <td>The Ingenious Gentleman Don Quixote of La Mancha</td>
        <td>1605</td>
        <td>9783125798502</td>
      </tr>
      <tr>
        <td>Gabrielle-Suzanne Barbot de Villeneuve</td>
        <td>La Belle et la Bête</td>
        <td>1740</td>
        <td>9781910880067</td>
      </tr>
      <tr>
        <td>Sir Isaac Newton</td>
        <td>The Method of Fluxions and Infinite Series: With Its Application to the Geometry of Curve-lines</td>
        <td>1763</td>
        <td>9781330454862</td>
      </tr>
      <tr>
        <td>Mary Shelley</td>
        <td>Frankenstein; or, The Modern Prometheus</td>
        <td>1818</td>
        <td>9781530278442</td>
      </tr>
      <tr>
        <td>Herman Melville</td>
        <td>Moby-Dick; or, The Whale</td>
        <td>1851</td>
        <td>9781530697908</td>
      </tr>
      <tr>
        <td>Emma Dorothy Eliza Nevitte Southworth</td>
        <td>The Hidden Hand</td>
        <td>1888</td>
        <td>9780813512969</td>
      </tr>
      <tr>
        <td>F. Scott Fitzgerald</td>
        <td>The Great Gatsby</td>
        <td>1925</td>
        <td>9780743273565</td>
      </tr>
      <tr>
        <td>George Orwell</td>
        <td>Nineteen Eighty-Four</td>
        <td>1948</td>
        <td>9780451524935</td>
      </tr>
      <tr>
        <td>Nnedi Okorafor</td>
        <td>Who Fears Death</td>
        <td>2010</td>
        <td>9780756406691</td>
      </tr>
    </tbody>
  </table>



  <table class="block">
    <caption>Table with Block</caption>
    <thead>
      <tr>
        <th>Author</th>
        <th>Title</th>
        <th>Year</th>
        <th>ISBN-13</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td>Miguel De Cervantes</td>
        <td>The Ingenious Gentleman Don Quixote of La Mancha</td>
        <td>1605</td>
        <td>9783125798502</td>
      </tr>
      <tr>
        <td>Gabrielle-Suzanne Barbot de Villeneuve</td>
        <td>La Belle et la Bête</td>
        <td>1740</td>
        <td>9781910880067</td>
      </tr>
      <tr>
        <td>Sir Isaac Newton</td>
        <td>The Method of Fluxions and Infinite Series: With Its Application to the Geometry of Curve-lines</td>
        <td>1763</td>
        <td>9781330454862</td>
      </tr>
      <tr>
        <td>Mary Shelley</td>
        <td>Frankenstein; or, The Modern Prometheus</td>
        <td>1818</td>
        <td>9781530278442</td>
      </tr>
      <tr>
        <td>Herman Melville</td>
        <td>Moby-Dick; or, The Whale</td>
        <td>1851</td>
        <td>9781530697908</td>
      </tr>
      <tr>
        <td>Emma Dorothy Eliza Nevitte Southworth</td>
        <td>The Hidden Hand</td>
        <td>1888</td>
        <td>9780813512969</td>
      </tr>
      <tr>
        <td>F. Scott Fitzgerald</td>
        <td>The Great Gatsby</td>
        <td>1925</td>
        <td>9780743273565</td>
      </tr>
      <tr>
        <td>George Orwell</td>
        <td>Nineteen Eighty-Four</td>
        <td>1948</td>
        <td>9780451524935</td>
      </tr>
      <tr>
        <td>Nnedi Okorafor</td>
        <td>Who Fears Death</td>
        <td>2010</td>
        <td>9780756406691</td>
      </tr>
    </tbody>
  </table>



  <table class="inline-block">
    <caption>Table with Inline-block</caption>
    <thead>
      <tr>
        <th>Author</th>
        <th>Title</th>
        <th>Year</th>
        <th>ISBN-13</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td>Miguel De Cervantes</td>
        <td>The Ingenious Gentleman Don Quixote of La Mancha</td>
        <td>1605</td>
        <td>9783125798502</td>
      </tr>
      <tr>
        <td>Gabrielle-Suzanne Barbot de Villeneuve</td>
        <td>La Belle et la Bête</td>
        <td>1740</td>
        <td>9781910880067</td>
      </tr>
      <tr>
        <td>Sir Isaac Newton</td>
        <td>The Method of Fluxions and Infinite Series: With Its Application to the Geometry of Curve-lines</td>
        <td>1763</td>
        <td>9781330454862</td>
      </tr>
      <tr>
        <td>Mary Shelley</td>
        <td>Frankenstein; or, The Modern Prometheus</td>
        <td>1818</td>
        <td>9781530278442</td>
      </tr>
      <tr>
        <td>Herman Melville</td>
        <td>Moby-Dick; or, The Whale</td>
        <td>1851</td>
        <td>9781530697908</td>
      </tr>
      <tr>
        <td>Emma Dorothy Eliza Nevitte Southworth</td>
        <td>The Hidden Hand</td>
        <td>1888</td>
        <td>9780813512969</td>
      </tr>
      <tr>
        <td>F. Scott Fitzgerald</td>
        <td>The Great Gatsby</td>
        <td>1925</td>
        <td>9780743273565</td>
      </tr>
      <tr>
        <td>George Orwell</td>
        <td>Nineteen Eighty-Four</td>
        <td>1948</td>
        <td>9780451524935</td>
      </tr>
      <tr>
        <td>Nnedi Okorafor</td>
        <td>Who Fears Death</td>
        <td>2010</td>
        <td>9780756406691</td>
      </tr>
    </tbody>
  </table>



  <table class="contents">
    <caption>Table with Contents</caption>
    <thead>
      <tr>
        <th>Author</th>
        <th>Title</th>
        <th>Year</th>
        <th>ISBN-13</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td>Miguel De Cervantes</td>
        <td>The Ingenious Gentleman Don Quixote of La Mancha</td>
        <td>1605</td>
        <td>9783125798502</td>
      </tr>
      <tr>
        <td>Gabrielle-Suzanne Barbot de Villeneuve</td>
        <td>La Belle et la Bête</td>
        <td>1740</td>
        <td>9781910880067</td>
      </tr>
      <tr>
        <td>Sir Isaac Newton</td>
        <td>The Method of Fluxions and Infinite Series: With Its Application to the Geometry of Curve-lines</td>
        <td>1763</td>
        <td>9781330454862</td>
      </tr>
      <tr>
        <td>Mary Shelley</td>
        <td>Frankenstein; or, The Modern Prometheus</td>
        <td>1818</td>
        <td>9781530278442</td>
      </tr>
      <tr>
        <td>Herman Melville</td>
        <td>Moby-Dick; or, The Whale</td>
        <td>1851</td>
        <td>9781530697908</td>
      </tr>
      <tr>
        <td>Emma Dorothy Eliza Nevitte Southworth</td>
        <td>The Hidden Hand</td>
        <td>1888</td>
        <td>9780813512969</td>
      </tr>
      <tr>
        <td>F. Scott Fitzgerald</td>
        <td>The Great Gatsby</td>
        <td>1925</td>
        <td>9780743273565</td>
      </tr>
      <tr>
        <td>George Orwell</td>
        <td>Nineteen Eighty-Four</td>
        <td>1948</td>
        <td>9780451524935</td>
      </tr>
      <tr>
        <td>Nnedi Okorafor</td>
        <td>Who Fears Death</td>
        <td>2010</td>
        <td>9780756406691</td>
      </tr>
    </tbody>
  </table>
              
            
!

CSS

              
                body {
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto,
    Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  line-height: 1.4;
  /*   line-height: 1.5; */
  /*   letter-spacing: 0.12em; */
  /*   word-spacing: 0.16em; */
}

/* Standard Tables */

table {
  margin: 2em 0;
  border-collapse: collapse;
  border: 0.1em solid #d6d6d6;
}

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

th,
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: #666;
  color: #fff;
}

tr:nth-child(even) th[scope=row] {
  background-color: #f2f2f2;
}

tr:nth-child(odd) th[scope=row] {
  background-color: #fff;
}

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(2) {
  font-style: italic;
}

th:nth-of-type(3),
td:nth-of-type(3) {
  text-align: right;
}

/* Assorted display types */


.flex {
  border: .1em solid #f00;
}

.flex tr {
  display: flex;
}

.flex tr * {
  flex:  0 0 10em;
}

.flex tr *:nth-child(1) {
  flex:  1 1 10em;
}

.flex tr *:nth-child(2) {
  flex:  1 1 20em;
}

.flex tr *:nth-child(3) {
  flex:  0 0 3em;
}

.flex tr *:nth-child(4) {
  flex:  0 1 10em;
}

.grid {
  border: .1em solid #0f0;
}

.grid tr {
  display: grid;
  grid-template-columns: 18em 27em 3em 10em;
}

.block {
  border: .1em solid #00f;
}

.block tr > * {
  display: block;
/*   float: left; */
}

.block tr *:nth-child(1) {
  width: 18em;
}

.block tr *:nth-child(2) {
  width: 27em;
}

.block tr *:nth-child(3) {
  width: 3em;
}

.block tr *:nth-child(4) {
  width: 10em;
}

.inline-block {
  border: .1em solid #f0f;
}

.inline-block tr > * {
  display: inline-block;
}

.inline-block tr *:nth-child(1) {
  width: 18em;
}

.inline-block tr *:nth-child(2) {
  width: 27em;
}

.inline-block tr *:nth-child(3) {
  width: 3em;
}

.inline-block tr *:nth-child(4) {
  width: 10em;
}

.contents {
  border: .1em solid #ff0;
}

.contents tr > * {
  display: contents;
}

.contents tr *:nth-child(1) {
  width: 18em;
}

.contents tr *:nth-child(2) {
  width: 27em;
}

.contents tr *:nth-child(3) {
  width: 3em;
}

.contents tr *:nth-child(4) {
  width: 10em;
}
              
            
!

JS

              
                
              
            
!
999px

Console