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


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.


                <h3>Responsive Table with Foundation</h3>

<div class="row">
  <div class="small-12 column">
    <table summary="This table shows how to create responsive tables using Foundation's extended functionality" class="responsive">
      <caption>An example of a responsive table based on <a href="" target="_blank">Foundation</a>:</caption>
          <th>Median Age</th>
          <th>Area (Km²)</th>
          <td>Spanish (official), English, Italian, German, French</td>
          <td>English 79%, native and other languages</td>
          <td>Greek 99% (official), English, French</td>
          <td>Luxermbourgish (national) French, German (both administrative)</td>
          <td>Russian, others</td>
          <td>Swedish, small Sami- and Finnish-speaking minorities</td>
          <td colspan="5" class="text-center">Data retrieved from <a href="" target="_blank">infoplease</a> and <a href="" target="_blank">worldometers</a>.</td>

<p class="p">Demo by George Martsoukos. <a href="" target="_blank">See article</a>.</p>


                h3 {
  padding: 20px 0;
  text-align: center;
  font-size: 1.9em;

table {
  width: 100%;
  margin: 0;

table caption {
  font-size: .9em;
	padding: .5em 0;

table caption,
table tfoot tr td {
  font-weight: normal;

@media screen and (max-width: 766px) {
  table caption {
    display: none;

.p {
  text-align: center;
  padding-top: 140px;
  font-size: 14px;


                // responsive-tables.js
$(document).ready(function() {
  var switched = false;
  var updateTables = function() {
    if (($(window).width() < 767) && !switched ){
      switched = true;
      $("table.responsive").each(function(i, element) {
      return true;
    else if (switched && ($(window).width() > 767)) {
      switched = false;
      $("table.responsive").each(function(i, element) {
  $(window).on("redraw",function(){switched=false;updateTables();}); // An event to listen for
  $(window).on("resize", updateTables);
	function splitTable(original)
		original.wrap("<div class='table-wrapper' />");
		var copy = original.clone();
		copy.find("td:not(:first-child), th:not(:first-child)").css("display", "none");
		copy.wrap("<div class='pinned' />");
		original.wrap("<div class='scrollable' />");

    setCellHeights(original, copy);
	function unsplitTable(original) {

  function setCellHeights(original, copy) {
    var tr = original.find('tr'),
        tr_copy = copy.find('tr'),
        heights = [];

    tr.each(function (index) {
      var self = $(this),
          tx = self.find('th, td');

      tx.each(function () {
        var height = $(this).outerHeight(true);
        heights[index] = heights[index] || 0;
        if (height > heights[index]) heights[index] = height;


    tr_copy.each(function (index) {


$(window).on('load resize', function () {
  if ($(this).width() < 767) {
    $('table tfoot').hide();
  } else {
    $('table tfoot').show();