diff -urp /Users/alex/Desktop/drupal-7.x-dev/includes/common.inc includes/common.inc
--- /Users/alex/Desktop/drupal-7.x-dev/includes/common.inc	2009-10-04 22:48:38.000000000 -0400
+++ includes/common.inc	2009-10-08 23:06:50.000000000 -0400
@@ -2697,7 +2697,7 @@ function base_path() {
  * This function can be called as long the HTML header hasn't been sent.
  */
 function drupal_add_link($attributes) {
-  drupal_add_html_head('<link' . drupal_attributes($attributes) . " />\n");
+  drupal_add_html_head(theme('link', $attributes) . "\n");
 }
 
 /**
@@ -2895,7 +2895,7 @@ function drupal_get_css($css = NULL) {
       case 'file':
         // Depending on whether aggregation is desired, include the file.
         if (!$item['preprocess'] || !($is_writable && $preprocess_css)) {
-          $rendered_css[] = '<link type="text/css" rel="stylesheet" media="' . $item['media'] . '" href="' . file_create_url($item['data']) . $query_string . '" />';
+          $rendered_css[] = theme('link', array('href'  => file_create_url($item['data']) . $query_string, 'media' => $item['media']));
         }
         else {
           $preprocess_items[$item['media']][] = $item;
@@ -2910,7 +2910,7 @@ function drupal_get_css($css = NULL) {
         break;
       case 'external':
         // Preprocessing for external CSS files is ignored.
-        $external_css .= '<link type="text/css" rel="stylesheet" media="' . $item['media'] . '" href="' . $item['data'] . '" />' . "\n";
+        $external_css .= theme('link',array('href'  => $item['data'], 'media' => $item['media'])) . "\n";
         break;
     }
   }
@@ -2926,7 +2926,7 @@ function drupal_get_css($css = NULL) {
   }
   // Enclose the inline CSS with the style tag if required.
   if (!empty($inline_css)) {
-    $inline_css = "\n" . '<style type="text/css">' . $inline_css .'</style>';
+    $inline_css = "\n" . theme('style',$inline_css);
   }
 
   // Output all the CSS files with the inline stylesheets showing up last.
@@ -4817,6 +4817,12 @@ function drupal_common_theme() {
     'status_messages' => array(
       'arguments' => array('display' => NULL),
     ),
+    'link' => array(
+      'arguments' => array('attributes' => array()),
+    ),
+    'style' => array(
+      'arguments' => array('styles' => NULL),'attributes' => array(),
+    ),
     'links' => array(
       'arguments' => array('links' => NULL, 'attributes' => array('class' => array('links')), 'heading' => array()),
     ),
diff -urp /Users/alex/Desktop/drupal-7.x-dev/includes/theme.inc includes/theme.inc
--- /Users/alex/Desktop/drupal-7.x-dev/includes/theme.inc	2009-10-04 22:43:01.000000000 -0400
+++ includes/theme.inc	2009-10-08 23:07:30.000000000 -0400
@@ -1394,6 +1394,48 @@ function theme_status_messages($display 
 }
 
 /**
+ * Return a <style> tag with inline styles.
+ *
+ * @param $styles
+ *   A string of inline styles to be included within a <script> tag
+ * @param $attributes
+ *   An associative array of HTML attributes.
+ * @return
+ *   A string containing a <style> tag.
+ */
+function theme_style($styles,$attributes=array()){
+  //set a default value for type
+  if(!isset($attributes['type'])){
+    $attributes['type'] = 'text/css';
+  }
+
+  $output = '<style' . drupal_attributes($attributes) . '>' . $styles .'</style>';
+
+  return $output;
+}
+
+/**
+ * Return a themed <link> tag
+ *
+ * @param $attributes
+ *   An associative array of HTML attributes. 
+ * @return
+ *   A string containing a <link> tag.
+ */
+function theme_link(array $attributes = array()){
+  //set default values for type and rel
+  if(!isset($attributes['type'])){
+    $attributes['type'] = 'text/css';
+  }
+  if(!isset($attributes['rel'])){
+    $attributes['rel'] = 'stylesheet';
+  }
+	
+  $output = '<link' . drupal_attributes($attributes) . '/>';
+  return $output;
+}
+
+/**
  * Return a themed set of links.
  *
  * @param $links
