diff --git a/core/includes/theme.inc b/core/includes/theme.inc
index 4230087..6056350 100644
--- a/core/includes/theme.inc
+++ b/core/includes/theme.inc
@@ -1549,7 +1549,7 @@ function template_preprocess_table(&$variables) {
   $responsive_classes = array();
 
   // Format the table header:
-  $ts = array();
+  $ts =array();
   if (!empty($variables['header'])) {
     $ts = tablesort_init($variables['header']);
 
@@ -1598,6 +1598,48 @@ function template_preprocess_table(&$variables) {
     }
   }
 
+  // Format the table footer:
+  if (!empty($variables['footer'])) {
+
+    foreach ($variables['footer'] as $col_key => $cell) {
+      if (!is_array($cell)) {
+        $cell_content = $cell;
+        $cell_attributes = new Attribute();
+      }
+      else {
+        $cell_content = '';
+        if (isset($cell['data'])) {
+          $cell_content = $cell['data'];
+          unset($cell['data']);
+        }
+        // Flag the cell as a footer or not and remove the flag.
+        unset($cell['footer']);
+
+        // Track responsive classes for each column as needed. Only the footer
+        // cells for a column are marked up with the responsive classes by a
+        // module developer or themer. The responsive classes on the footer cells
+        // must be transferred to the content cells.
+        if (!empty($cell['class']) && is_array($cell['class'])) {
+          if (in_array(RESPONSIVE_PRIORITY_MEDIUM, $cell['class'])) {
+            $responsive_classes[$col_key] = RESPONSIVE_PRIORITY_MEDIUM;
+          }
+          elseif (in_array(RESPONSIVE_PRIORITY_LOW, $cell['class'])) {
+            $responsive_classes[$col_key] = RESPONSIVE_PRIORITY_LOW;
+          }
+        }
+
+        if (is_array($cell_content)) {
+          $cell_content = drupal_render($cell_content);
+        }
+        $cell_attributes = new Attribute($cell);
+      }
+      $variables['footer'][$col_key] = array();
+      $variables['footer'][$col_key]['tag'] = 'td';
+      $variables['footer'][$col_key]['attributes'] = $cell_attributes;
+      $variables['footer'][$col_key]['content'] = $cell_content;
+    }
+  }
+
   if (!empty($variables['rows'])) {
     $flip = array('even' => 'odd', 'odd' => 'even');
     $class = 'even';
@@ -2553,7 +2595,7 @@ function drupal_common_theme() {
       'template' => 'breadcrumb',
     ),
     'table' => array(
-      'variables' => array('header' => NULL, 'rows' => NULL, 'attributes' => array(), 'caption' => NULL, 'colgroups' => array(), 'sticky' => FALSE, 'responsive' => TRUE, 'empty' => ''),
+      'variables' => array('header' => NULL, 'footer' => NULL, 'rows' => NULL, 'attributes' => array(), 'caption' => NULL, 'colgroups' => array(), 'sticky' => FALSE, 'responsive' => TRUE, 'empty' => ''),
       'template' => 'table',
     ),
     'tablesort_indicator' => array(
diff --git a/core/modules/system/lib/Drupal/system/Tests/Theme/TableTest.php b/core/modules/system/lib/Drupal/system/Tests/Theme/TableTest.php
index 6b9c5ef..80f5f90 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Theme/TableTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Theme/TableTest.php
@@ -86,15 +86,24 @@ function testThemeTableWithEmptyMessage() {
         'colspan' => 2,
       ),
     );
+    $footer = array(
+      'Footer 1',
+      array(
+        'data' => 'Footer 2',
+        'colspan' => 2,
+      ),
+    );
     $table = array(
       '#type' => 'table',
       '#header' => $header,
+      '#footer' => $footer,
       '#rows' => array(),
       '#empty' => 'Empty row.',
     );
     $this->render($table);
     $this->removeWhiteSpace();
     $this->assertRaw('<thead><tr><th>Header 1</th><th colspan="2">Header 2</th></tr>', 'Table header found.');
+    $this->assertRaw('<tfoot><tr><td>Footer 1</td><td colspan="2">Footer 2</td></tr>', 'Table footer found.');
     $this->assertRaw('<tr class="odd"><td colspan="3" class="empty message">Empty row.</td>', 'Colspan on #empty row found.');
   }
 
diff --git a/core/modules/system/templates/table.html.twig b/core/modules/system/templates/table.html.twig
index ce69286..48b0c12 100644
--- a/core/modules/system/templates/table.html.twig
+++ b/core/modules/system/templates/table.html.twig
@@ -40,7 +40,6 @@
   {% if caption %}
     <caption>{{ caption }}</caption>
   {% endif %}
-
   {% for colgroup in colgroups %}
     {% if colgroup.cols %}
       <colgroup{{ colgroup.attributes }}>
@@ -52,7 +51,6 @@
       <colgroup{{ colgroup.attributes }} />
     {% endif %}
   {% endfor %}
-
   {% if header %}
     <thead>
       <tr>
@@ -64,7 +62,17 @@
       </tr>
     </thead>
   {% endif %}
-
+  {% if footer %}
+    <tfoot>
+    <tr>
+      {% for cell in footer %}
+        <{{ cell.tag }}{{ cell.attributes }}>
+          {{- cell.content -}}
+        </{{ cell.tag }}>
+      {% endfor %}
+    </tr>
+    </tfoot>
+  {% endif %}
   {% if rows %}
     <tbody>
       {% for row in rows %}
