diff --git a/core/includes/theme.inc b/core/includes/theme.inc
index 9a4f2ee..a9b9c9b 100644
--- a/core/includes/theme.inc
+++ b/core/includes/theme.inc
@@ -2426,41 +2426,39 @@ function theme_feed_icon($variables) {
 }
 
 /**
- * Returns HTML for a generic HTML tag with attributes.
+ * Prepares variables for HTML tag templates.
  *
- * @param $variables
+ * Default template: html-tag.html.twig.
+ *
+ * @param array $variables
  *   An associative array containing:
  *   - element: An associative array describing the tag:
  *     - #tag: The tag name to output. Typical tags added to the HTML HEAD:
- *       - meta: To provide meta information, such as a page refresh.
- *       - link: To refer to stylesheets and other contextual information.
- *       - script: To load JavaScript.
+ *       - meta: Used to provide meta information, such as a page refresh.
+ *       - link: Used to refer to stylesheets and other contextual information.
+ *       - script: Use for loading JavaScript.
  *     - #attributes: (optional) An array of HTML attributes to apply to the
  *       tag.
- *     - #value: (optional) A string containing tag content, such as inline
- *       CSS.
+ *     - #value: (optional) A string containing tag content, such as inline CSS.
  *     - #value_prefix: (optional) A string to prepend to #value, e.g. a CDATA
  *       wrapper prefix.
  *     - #value_suffix: (optional) A string to append to #value, e.g. a CDATA
  *       wrapper suffix.
  */
-function theme_html_tag($variables) {
+function template_preprocess_html_tag(&$variables) {
   $element = $variables['element'];
-  $attributes = isset($element['#attributes']) ? new Attribute($element['#attributes']) : '';
-  if (!isset($element['#value'])) {
-    return '<' . $element['#tag'] . $attributes . " />\n";
+  $variables['attributes'] = isset($element['#attributes']) ? new Attribute($element['#attributes']) : new Attribute(array());
+  if (isset($element['#value'])) {
+    $variables['value'] = $element['#value'];
   }
-  else {
-    $output = '<' . $element['#tag'] . $attributes . '>';
-    if (isset($element['#value_prefix'])) {
-      $output .= $element['#value_prefix'];
-    }
-    $output .= $element['#value'];
-    if (isset($element['#value_suffix'])) {
-      $output .= $element['#value_suffix'];
-    }
-    $output .= '</' . $element['#tag'] . ">\n";
-    return $output;
+  if (isset($element['#tag'])) {
+    $variables['tag'] = $element['#tag'];
+  }
+  if (isset($element['#value_prefix'])) {
+    $variables['value_prefix'] = $element['#value_prefix'];
+  }
+  if (isset($element['#value_prefix'])) {
+    $variables['value_suffix'] = $element['#value_suffix'];
   }
 }
 
@@ -3208,6 +3206,7 @@ function drupal_common_theme() {
     ),
     'html_tag' => array(
       'render element' => 'element',
+      'template' => 'html-tag',
     ),
     // From theme.maintenance.inc.
     'maintenance_page' => array(
diff --git a/core/modules/system/lib/Drupal/system/Tests/Theme/HtmlTagUnitTest.php b/core/modules/system/lib/Drupal/system/Tests/Theme/HtmlTagUnitTest.php
deleted file mode 100644
index b8c6ffb..0000000
--- a/core/modules/system/lib/Drupal/system/Tests/Theme/HtmlTagUnitTest.php
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-
-/**
- * @file
- * Definition of Drupal\system\Tests\Theme\HtmlTagUnitTest.
- */
-
-namespace Drupal\system\Tests\Theme;
-
-use Drupal\simpletest\UnitTestBase;
-
-/**
- * Unit tests for theme_html_tag().
- */
-class HtmlTagUnitTest extends UnitTestBase {
-  public static function getInfo() {
-    return array(
-      'name' => 'Theme HTML Tag',
-      'description' => 'Tests theme_html_tag() built-in theme functions.',
-      'group' => 'Theme',
-    );
-  }
-
-  /**
-   * Test function theme_html_tag()
-   */
-  function testThemeHtmlTag() {
-    // Test auto-closure meta tag generation
-    $tag['element'] = array('#tag' => 'meta', '#attributes' => array('name' => 'description', 'content' => 'Drupal test'));
-    $this->assertEqual('<meta name="description" content="Drupal test" />'."\n", theme_html_tag($tag), 'Test auto-closure meta tag generation.');
-
-    // Test title tag generation
-    $tag['element'] = array('#tag' => 'title', '#value' => 'title test');
-    $this->assertEqual('<title>title test</title>'."\n", theme_html_tag($tag), 'Test title tag generation.');
-  }
-}
diff --git a/core/modules/system/lib/Drupal/system/Tests/Theme/PreprocessHtmlTagUnitTest.php b/core/modules/system/lib/Drupal/system/Tests/Theme/PreprocessHtmlTagUnitTest.php
new file mode 100644
index 0000000..e5c18cb
--- /dev/null
+++ b/core/modules/system/lib/Drupal/system/Tests/Theme/PreprocessHtmlTagUnitTest.php
@@ -0,0 +1,41 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\system\Tests\Theme\PreprocessHtmlTagUnitTest.
+ */
+
+namespace Drupal\system\Tests\Theme;
+
+use Drupal\simpletest\UnitTestBase;
+
+/**
+ * Unit tests for template_preprocess_html_tag().
+ */
+class PreprocessHtmlTagUnitTest extends UnitTestBase {
+  public static function getInfo() {
+    return array(
+      'name' => 'Preprocess HTML Tag',
+      'description' => 'Tests template_preprocess_html_tag() function.',
+      'group' => 'Theme',
+    );
+  }
+
+  /**
+   * Tests template_preprocess_html_tag().
+   */
+  function testPreprocessHtmlTag() {
+    // Test running sample meta tag through the preprocess function.
+    $variables['element'] = array('#tag' => 'meta', '#attributes' => array('name' => 'description', 'content' => 'Drupal test'));
+    template_preprocess_html_tag($variables);
+    $this->assertEqual($variables['tag'], 'meta', "'tag' variable is set to 'meta'.");
+    $this->assertTrue(!isset($variables['value']), "'value' variable is not set when no value is passed in.");
+
+    // Test running sample title tag through the preprocess function.
+    $variables = array();
+    $variables['element'] = array('#tag' => 'title', '#value' => 'title test');
+    template_preprocess_html_tag($variables);
+    $this->assertEqual($variables['tag'], 'title', "'tag' variable is set to 'title'.");
+    $this->assertEqual($variables['value'], 'title test', "'value' variable is equal to the value of '#value' in the element array.");
+  }
+}
diff --git a/core/modules/system/templates/html-tag.html.twig b/core/modules/system/templates/html-tag.html.twig
new file mode 100644
index 0000000..3b1d596
--- /dev/null
+++ b/core/modules/system/templates/html-tag.html.twig
@@ -0,0 +1,36 @@
+{#
+/**
+ * Default theme implementation for a generic HTML tag with attributes.
+ *
+ * Available variables:
+ * - tag: The tag name to output. Typical tags added to the HTML <head>:
+ *   - meta: Used to provide meta information, such as a page refresh.
+ *   - link: Used to refer to stylesheets and other contextual information.
+ *   - script: Use for loading JavaScript.
+ * - attributes: (optional) Remaining HTML attributes to apply to the tag.
+ * - value: (optional) The tag content, such as inline CSS.
+ * - value_prefix: (optional) Prepend this to 'value', e.g. a CDATA wrapper
+ *   prefix.
+ * - value_suffix: (optional) Append this to 'value', e.g. a CDATA wrapper
+ *   suffix.
+ *
+ * @see template_preprocess()
+ * @see template_preprocess_html_tag()
+ *
+ * @ingroup themeable
+ */
+ @todo Delete this file once http://drupal.org/node/1825090 is resolved.
+#}
+{% if value is defined -%}
+  <{{ tag }}{{ attributes }}>
+    {%- if value_prefix is defined -%}
+      {{- value_prefix -}}
+    {%- endif -%}
+    {{- value -}}
+    {%- if value_suffix is defined -%}
+      {{- value_suffix -}}
+    {%- endif -%}
+  </{{ tag }}>
+{% else -%}
+  <{{ tag }}{{ attributes }} />
+{% endif %}
