diff --git a/core/modules/taxonomy/taxonomy.module b/core/modules/taxonomy/taxonomy.module
index 43d2ac8..9386f9e 100644
--- a/core/modules/taxonomy/taxonomy.module
+++ b/core/modules/taxonomy/taxonomy.module
@@ -9,6 +9,7 @@
 use Drupal\taxonomy\Plugin\Core\Entity\Term;
 use Drupal\taxonomy\Plugin\Core\Entity\Vocabulary;
 use Drupal\Core\Entity\EntityInterface;
+use Drupal\Core\Template\Attribute;
 
 /**
  * Denotes that no term in the vocabulary has a parent.
@@ -529,7 +530,18 @@ function taxonomy_term_view_multiple(array $terms, $view_mode = 'full', $langcod
 }
 
 /**
- * Process variables for taxonomy-term.tpl.php.
+ * Prepares variables for taxonomy term templates.
+ *
+ * Default template: taxonomy-term.html.twig.
+ *
+ * @param array $variables
+ *   An associative array containing:
+ *   - elements: An associative array containing the taxonomy term and any
+ *     fields attached to the term. Properties used:
+ *     - #term: The term object.
+ *     - #view_mode: The current view mode for this taxonomy term, e.g.
+ *       'full' or 'teaser'.
+ *   - attributes: HTML attributes for the containing element.
  */
 function template_preprocess_taxonomy_term(&$variables) {
   $variables['view_mode'] = $variables['elements']['#view_mode'];
@@ -539,7 +551,7 @@ function template_preprocess_taxonomy_term(&$variables) {
   $uri = $term->uri();
   $variables['url']  = url($uri['path'], $uri['options']);
   $variables['label'] = check_plain($term->label());
-  $variables['page']      = $variables['view_mode'] == 'full' && taxonomy_term_is_page($term);
+  $variables['page'] = $variables['view_mode'] == 'full' && taxonomy_term_is_page($term);
 
   // Helpful $content variable for templates.
   $variables['content'] = array();
@@ -556,6 +568,7 @@ function template_preprocess_taxonomy_term(&$variables) {
   // Gather classes, and clean up name so there are no underscores.
   $vocabulary_name_css = str_replace('_', '-', $term->bundle());
   $variables['attributes']['class'][] = 'vocabulary-' . $vocabulary_name_css;
+  $variables['attributes'] = new Attribute($variables['attributes']);
 
   $variables['theme_hook_suggestions'][] = 'taxonomy_term__' . $term->bundle();
   $variables['theme_hook_suggestions'][] = 'taxonomy_term__' . $term->tid;
diff --git a/core/modules/taxonomy/templates/taxonomy-term.html.twig b/core/modules/taxonomy/templates/taxonomy-term.html.twig
new file mode 100644
index 0000000..378a8a8
--- /dev/null
+++ b/core/modules/taxonomy/templates/taxonomy-term.html.twig
@@ -0,0 +1,39 @@
+{#
+/**
+ * @file
+ * Default theme implementation to display a taxonomy term.
+ *
+ * Available variables:
+ * - url: Direct URL of the current term.
+ * - title: Name of the current term.
+ * - content: Items for the content of the term (fields and description).
+ *   Use 'content' to print them all, or print a subset such as
+ *   'content.field_example'. Use {% hide(content.field_example) %} to
+ *   temporarily suppress the printing of a given element.
+ * - attributes: HTML attributes for the containing element. It includes
+ *   the 'class' information, which includes:
+ *   - taxonomy-term: The current template type, i.e., "theming hook".
+ *   - vocabulary-[vocabulary-name]: The vocabulary that this term belongs to.
+ *     For example, if the term is a "Tag" it would result in "vocabulary-tag".
+ * - page: Flag for the full page state.
+ * - term: Full term object.
+ * - view_mode: View mode, e.g. 'full', 'teaser', etc.
+ * - user: The currently logged-in user.
+ *
+ * @see template_preprocess()
+ * @see template_preprocess_taxonomy_term()
+ *
+ * @ingroup themeable
+ */
+#}
+<div id="taxonomy-term-{{ term.tid }}"{{ attributes }}>
+
+  {% if not page %}
+    <h2><a href="{{ url }}">{{ label }}</a></h2>
+  {% endif %}
+
+  <div class="content">
+    {{ content }}
+  </div>
+
+</div>
diff --git a/core/modules/taxonomy/templates/taxonomy-term.tpl.php b/core/modules/taxonomy/templates/taxonomy-term.tpl.php
deleted file mode 100644
index 0cd63d0..0000000
--- a/core/modules/taxonomy/templates/taxonomy-term.tpl.php
+++ /dev/null
@@ -1,47 +0,0 @@
-<?php
-
-/**
- * @file
- * Default theme implementation to display a term.
- *
- * Available variables:
- * - $content: An array of items for the content of the term (fields and
- *   description). Use render($content) to print them all, or print a subset
- *   such as render($content['field_example']). Use
- *   hide($content['field_example']) to temporarily suppress the printing of a
- *   given element.
- * - $url: Direct url of the current term.
- * - $label: Name of the current term.
- * - $attributes: An instance of Attributes class that can be manipulated as an
- *    array and printed as a string.
- *    It includes the 'class' information, which includes:
- *   - taxonomy-term: The current template type, i.e., "theming hook".
- *   - vocabulary-[vocabulary-name]: The vocabulary to which the term belongs to.
- *     For example, if the term is a "Tag" it would result in "vocabulary-tag".
- *
- * Other variables:
- * - $term: Full term object. Contains data that may not be safe.
- * - $view_mode: View mode, e.g. 'full', 'teaser'...
- * - $page: Flag for the full page state.
- * - $is_front: Flags true when presented in the front page.
- * - $logged_in: Flags true when the current user is a logged-in member.
- * - $is_admin: Flags true when the current user is an administrator.
- *
- * @see template_preprocess()
- * @see template_preprocess_taxonomy_term()
- * @see template_process()
- *
- * @ingroup themeable
- */
-?>
-<div id="taxonomy-term-<?php print $term->tid; ?>"<?php print $attributes; ?>>
-
-  <?php if (!$page): ?>
-    <h2><a href="<?php print $url; ?>"><?php print $label; ?></a></h2>
-  <?php endif; ?>
-
-  <div class="content">
-    <?php print render($content); ?>
-  </div>
-
-</div>
