diff --git a/includes/common.inc b/includes/common.inc
index d64be82..eb1e118 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -249,22 +249,6 @@ function drupal_get_breadcrumb() {
 }
 
 /**
- * Returns a string containing RDF namespace declarations for use in XML and
- * XHTML output.
- */
-function drupal_get_rdf_namespaces() {
-  $xml_rdf_namespaces = array();
-
-  // Serializes the RDF namespaces in XML namespace syntax.
-  if (function_exists('rdf_get_namespaces')) {
-    foreach (rdf_get_namespaces() as $prefix => $uri) {
-      $xml_rdf_namespaces[] = 'xmlns:' . $prefix . '="' . $uri . '"';
-    }
-  }
-  return count($xml_rdf_namespaces) ? "\n  " . implode("\n  ", $xml_rdf_namespaces) : '';
-}
-
-/**
  * Add output to the head tag of the HTML page.
  *
  * This function can be called as long the headers aren't sent. Pass no
diff --git a/includes/theme.inc b/includes/theme.inc
index 6b8b271..5a66cbb 100644
--- a/includes/theme.inc
+++ b/includes/theme.inc
@@ -2221,13 +2221,14 @@ function template_preprocess_html(&$variables) {
     $variables['classes_array'][] = drupal_html_class('node-type-' . $node->type);
   }
 
-  // RDFa allows annotation of XHTML pages with RDF data, while GRDDL provides
-  // mechanisms for extraction of this RDF content via XSLT transformation
-  // using an associated GRDDL profile.
-  $variables['rdf_namespaces']    = drupal_get_rdf_namespaces();
-  $variables['grddl_profile']     = 'http://www.w3.org/1999/xhtml/vocab';
-  $variables['language']          = $GLOBALS['language'];
-  $variables['language']->dir     = $GLOBALS['language']->direction ? 'rtl' : 'ltr';
+  // HTML element attributes.
+  $variables['attributes_array'] = array(
+    'xmlns' => "http://www.w3.org/1999/xhtml",
+    'xml:lang' => $GLOBALS['language']->language,
+    'dir' => $GLOBALS['language']->direction ? 'rtl' : 'ltr',
+  );
+  // HTML Doctype.
+  $variables['doctype'] = '<!DOCTYPE html>' . "\n";
 
   // Add favicon.
   if (theme_get_setting('toggle_favicon')) {
diff --git a/modules/rdf/rdf.module b/modules/rdf/rdf.module
index ebecd42..d3889f8 100644
--- a/modules/rdf/rdf.module
+++ b/modules/rdf/rdf.module
@@ -461,6 +461,26 @@ function rdf_process(&$variables, $hook) {
 }
 
 /**
+ * Implements MODULE_preprocess_HOOK()
+ */
+function rdf_preprocess_html(&$variables) {
+  // RDFa allows annotation of XHTML pages with RDF data.
+  // These attributes are applied to the <html> element.
+  foreach(rdf_get_namespaces() as $prefix => $uri) {
+    $variables['attributes_array']['xmlns:' . $prefix] = $uri;
+  }
+  // Set the HTML version to XHTML+RDFa 1.0.
+  $variables['attributes_array']['version'] = "XHTML+RDFa 1.0";
+  // GRDDL provides mechanisms for extraction of this RDF content via XSLT
+  // transformation using an associated GRDDL profile.
+  $variables['title_attributes_array'] = array(
+    'profile' => 'http://www.w3.org/1999/xhtml/vocab',
+  );
+  // Change the doctype to include RDFa.
+  $variables['doctype'] = '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML+RDFa 1.1//EN">' . "\n";
+}
+
+/**
  * Implements MODULE_preprocess_HOOK().
  */
 function rdf_preprocess_node(&$variables) {
diff --git a/modules/system/html.tpl.php b/modules/system/html.tpl.php
index 0e01277..3443eaa 100644
--- a/modules/system/html.tpl.php
+++ b/modules/system/html.tpl.php
@@ -6,10 +6,12 @@
  * Drupal page.
  *
  * Variables:
+ * - $doctype: The DOCTYPE is the simple HTML5 'html' by default.
  * - $css: An array of CSS files for the current page.
  * - $language: (object) The language the site is being displayed in.
  *   $language->language contains its textual representation.
- *   $language->dir contains the language direction. It will either be 'ltr' or 'rtl'.
+ *   $language->dir contains the language direction.
+ *   It will either be 'ltr' or 'rtl'.
  * - $rdf_namespaces: All the RDF namespace prefixes used in the HTML document.
  * - $grddl_profile: A GRDDL profile allowing agents to extract the RDF data.
  * - $head_title: A modified version of the page title, for use in the TITLE
@@ -40,22 +42,21 @@
  * @see template_preprocess_html()
  * @see template_process()
  */
-?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN"
-  "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php print $language->language; ?>" version="XHTML+RDFa 1.0" dir="<?php print $language->dir; ?>"<?php print $rdf_namespaces; ?>>
-
-<head profile="<?php print $grddl_profile; ?>">
-  <?php print $head; ?>
-  <title><?php print $head_title; ?></title>
-  <?php print $styles; ?>
-  <?php print $scripts; ?>
-</head>
-<body class="<?php print $classes; ?>" <?php print $attributes;?>>
-  <div id="skip-link">
-    <a href="#main-content" class="element-invisible element-focusable"><?php print t('Skip to main content'); ?></a>
-  </div>
-  <?php print $page_top; ?>
-  <?php print $page; ?>
-  <?php print $page_bottom; ?>
-</body>
+?>
+<?php print $doctype; ?>
+<html<?php print $attributes; ?>>
+  <head<?php print $title_attributes; ?>>
+    <?php print $head; ?>
+    <title><?php print $head_title; ?></title>
+    <?php print $styles; ?>
+    <?php print $scripts; ?>
+  </head>
+  <body class="<?php print $classes; ?>" <?php print $content_attributes;?>>
+    <div id="skip-link">
+      <a href="#main-content" class="element-invisible element-focusable"><?php print t('Skip to main content'); ?></a>
+    </div>
+    <?php print $page_top; ?>
+    <?php print $page; ?>
+    <?php print $page_bottom; ?>
+  </body>
 </html>
