diff --git includes/common.inc includes/common.inc
index 51418c6..6e975f8 100644
--- includes/common.inc
+++ includes/common.inc
@@ -4333,6 +4333,39 @@ function drupal_set_page_content($content = NULL) {
 }
 
 /**
+ * #pre_render callback to render a link into #markup.
+ *
+ * Doing so during pre_render gives modules a chance to alter the link parts.
+ *
+ * @param $elements
+ *   A structured array whose keys form the arguments to l():
+ *   - #title: The link text to pass as argument to l().
+ *   - #href: The URL path component to pass as argument to l().
+ *   - #options: (optional) An array of options to pass to l().
+ *
+ * @return
+ *   The passed in elements containing a rendered link in '#markup'.
+ */
+function drupal_pre_render_link($elements) {
+  $options = isset($elements['#options']) ? $elements['#options'] : array();
+  $elements['#markup'] = l($elements['#title'], $elements['#href'], $options);
+  return $elements;
+}
+
+/**
+ * #post_render callback to prepend contents of #markup to $children.
+ *
+ * @param $elements
+ *   A structured array using the #markup key.
+ *
+ * @return
+ *   The passed in elements, but #markup prepended to $children.
+ */
+function drupal_post_render_markup($children, $elements) {
+  return $elements['#markup'] . $children;
+}
+
+/**
  * Renders the page, including all theming.
  *
  * @param $page
@@ -4440,6 +4473,12 @@ function drupal_render(&$elements) {
   if (isset($elements['#cache']) && $cached_output = drupal_render_cache_get($elements)) {
     return $cached_output;
   }
+  
+  // If #markup is not empty, set #type. This allows to specify just #markup on
+  // an element without setting #type.
+  if (!empty($elements['#markup']) && !isset($elements['#type'])) {
+    $elements['#type'] = 'markup';
+  }
 
   // If the default values for this element have not been loaded yet, populate
   // them.
@@ -4453,12 +4492,6 @@ function drupal_render(&$elements) {
     $elements += $defaults;
   }
 
-  // If #markup is not empty and no theme function is set, use theme_markup.
-  // This allows to specify just #markup on an element without setting the #type.
-  if (!empty($elements['#markup']) && empty($elements['#theme'])) {
-    $elements['#theme'] = 'markup';
-  }
-
   // Make any final changes to the element before it is rendered. This means
   // that the $element or the children can be altered or corrected before the
   // element is rendered into the final text.
@@ -5001,9 +5034,6 @@ function drupal_common_theme() {
     'textarea' => array(
       'arguments' => array('element' => NULL),
     ),
-    'markup' => array(
-      'arguments' => array('element' => NULL),
-    ),
     'password' => array(
       'arguments' => array('element' => NULL),
     ),
diff --git includes/form.inc includes/form.inc
index fda8161..e44d471 100644
--- includes/form.inc
+++ includes/form.inc
@@ -2586,24 +2586,6 @@ function theme_textarea($variables) {
 }
 
 /**
- * Theme HTML markup for use in forms.
- *
- * @param $variables
- *   An associative array containing:
- *   - element: An associative array containing the properties of the element.
- *     Properties used: #markup, #children.
- *
- * @return
- *   A themed HTML string representing the HTML markup.
- *
- * @ingroup themeable
- */
-function theme_markup($variables) {
-  $element = $variables['element'];
-  return (!empty($element['#markup']) ? $element['#markup'] : '') . drupal_render_children($element);
-}
-
-/**
  * Theme a password form element.
  *
  * @param $variables
diff --git includes/locale.inc includes/locale.inc
index 66ff11e..da40353 100644
--- includes/locale.inc
+++ includes/locale.inc
@@ -575,13 +575,13 @@ function _locale_languages_configure_form_language_table(&$form, $type) {
 
       $table_form['description'][$id] = array('#markup' => filter_xss_admin($provider['description']));
 
-      $config_op = '';
+      $config_op = array();
       if (isset($provider['config'])) {
-        $config_op = l(t('Configure'), $provider['config']);
+        $config_op = array('#type' => 'link', '#title' => t('Configure'), '#href' => $provider['config']);
         // If there is at least one operation enabled show the operation column.
         $table_form['#show_operations'] = TRUE;
       }
-      $table_form['operation'][$id] = array('#markup' => $config_op);
+      $table_form['operation'][$id] = $config_op;
     }
   }
 
diff --git includes/theme.inc includes/theme.inc
index 4caa5b5..851eb2a 100644
--- includes/theme.inc
+++ includes/theme.inc
@@ -2037,6 +2037,10 @@ function _theme_table_cell($cell, $header = FALSE) {
 
   if (is_array($cell)) {
     $data = isset($cell['data']) ? $cell['data'] : '';
+    // Cell's data property can be a string or a renderable array.
+    if (is_array($data)) {
+      $data = drupal_render($data);
+    }
     $header |= isset($cell['header']);
     unset($cell['data']);
     unset($cell['header']);
diff --git modules/block/block.admin.inc modules/block/block.admin.inc
index 372ca7b..88d3f6f 100644
--- modules/block/block.admin.inc
+++ modules/block/block.admin.inc
@@ -64,13 +64,15 @@ function block_admin_display_form($form, &$form_state, $blocks, $theme = NULL) {
       '#options' => $block_regions,
     );
     $form[$key]['configure'] = array(
-      '#markup' => l(t('configure'),
-      'admin/structure/block/configure/' . $block['module'] . '/' . $block['delta']),
+      '#type' => 'link',
+      '#title' => t('configure'),
+      '#href' => 'admin/structure/block/configure/' . $block['module'] . '/' . $block['delta'],
     );
     if ($block['module'] == 'block') {
       $form[$key]['delete'] = array(
-        '#markup' => l(t('delete'),
-        'admin/structure/block/delete/' . $block['delta']),
+        '#type' => 'link',
+        '#title' => t('delete'),
+        '#href' => 'admin/structure/block/delete/' . $block['delta'],
       );
     }
   }
diff --git modules/comment/comment.admin.inc modules/comment/comment.admin.inc
index 7b01e0f..77fa798 100644
--- modules/comment/comment.admin.inc
+++ modules/comment/comment.admin.inc
@@ -90,7 +90,12 @@ function comment_admin_overview($form, &$form_state, $arg) {
       'author' => theme('username', array('account' => $comment)),
       'posted_in' => l($comment->node_title, 'node/' . $comment->nid),
       'changed' => format_date($comment->changed, 'short'),
-      'operations' => l(t('edit'), 'comment/edit/' . $comment->cid, array('query' => $destination)),
+      'operations' => array('data' => array(
+        '#type' => 'link',
+        '#title' => t('edit'),
+        '#href' => 'comment/edit/' . $comment->cid,
+        '#options' => array('query' => $destination),
+      )),
     );
   }
 
diff --git modules/field_ui/field_ui.admin.inc modules/field_ui/field_ui.admin.inc
index 22ed638..1d593fe 100644
--- modules/field_ui/field_ui.admin.inc
+++ modules/field_ui/field_ui.admin.inc
@@ -107,17 +107,29 @@ function field_ui_field_overview_form($form, &$form_state, $obj_type, $bundle) {
         '#markup' => $instance['field_name'],
       ),
       'type' => array(
-        '#markup' => l(t($field_types[$field['type']]['label']), $admin_field_path . '/field-settings', array('attributes' => array('title' => t('Edit field settings.')))),
+        '#type' => 'link',
+        '#title' => t($field_types[$field['type']]['label']),
+        '#href' => $admin_field_path . '/field-settings',
+        '#options' => array('attributes' => array('title' => t('Edit field settings.'))),
       ),
       'widget_type' => array(
-        '#markup' => l(t($widget_types[$instance['widget']['type']]['label']), $admin_field_path . '/widget-type', array('attributes' => array('title' => t('Change widget type.')))),
+        '#type' => 'link',
+        '#title' => t($widget_types[$instance['widget']['type']]['label']),
+        '#href' => $admin_field_path . '/widget-type',
+        '#options' => array('attributes' => array('title' => t('Change widget type.'))),
       ),
       'edit' => array(
-        '#markup' => l(t('edit'), $admin_field_path, array('attributes' => array('title' => t('Edit instance settings.')))),
+        '#type' => 'link',
+        '#title' => t('edit'),
+        '#href' => $admin_field_path,
+        '#options' => array('attributes' => array('title' => t('Edit instance settings.'))),
       ),
       'delete' => array(
-        '#markup' => l(t('delete'), $admin_field_path . '/delete', array('attributes' => array('title' => t('Delete instance.')))),
-       ),
+        '#type' => 'link',
+        '#title' => t('delete'),
+        '#href' => $admin_field_path . '/delete',
+        '#options' => array('attributes' => array('title' => t('Delete instance.'))),
+      ),
       'weight' => array(
         '#type' => 'textfield',
         '#default_value' => $weight,
diff --git modules/filter/filter.admin.inc modules/filter/filter.admin.inc
index f4af703..99201dc 100644
--- modules/filter/filter.admin.inc
+++ modules/filter/filter.admin.inc
@@ -32,8 +32,8 @@ function filter_admin_overview($form) {
       $roles_markup = $roles ? implode(', ', $roles) : t('No roles may use this format');
     }
     $form['formats'][$id]['roles'] = array('#markup' => $roles_markup);
-    $form['formats'][$id]['configure'] = array('#markup' => l(t('configure'), 'admin/config/content/formats/' . $id));
-    $form['formats'][$id]['delete'] = array('#markup' => $form['formats'][$id]['#is_fallback'] ? '' : l(t('delete'), 'admin/config/content/formats/' . $id . '/delete'));
+    $form['formats'][$id]['configure'] = array('#type' => 'link', '#title' => t('configure'), '#href' => 'admin/config/content/formats/' . $id);
+    $form['formats'][$id]['delete'] = $form['formats'][$id]['#is_fallback'] ? array() : array('#type' => 'link', '#title' => t('delete'), '#href' => 'admin/config/content/formats/' . $id . '/delete');
     $form['formats'][$id]['weight'] = array('#type' => 'weight', '#default_value' => $format->weight);
   }
   $form['submit'] = array('#type' => 'submit', '#value' => t('Save changes'));
diff --git modules/image/image.admin.inc modules/image/image.admin.inc
index f48e141..512208b 100644
--- modules/image/image.admin.inc
+++ modules/image/image.admin.inc
@@ -71,10 +71,15 @@ function image_style_form($form, &$form_state, $style) {
       '#default_value' => $effect['weight'],
     );
     $form['effects'][$ieid]['configure'] = array(
-      '#markup' => isset($effect['form callback']) ? l(t('edit'), 'admin/config/media/image-styles/edit/' . $style['name'] . '/effects/' . $effect['ieid'] ) : '',
+      '#type' => 'link',
+      '#title' => t('edit'),
+      '#href' => 'admin/config/media/image-styles/edit/' . $style['name'] . '/effects/' . $effect['ieid'],
+      '#access' => isset($effect['form callback']),
     );
     $form['effects'][$ieid]['remove'] = array(
-      '#markup' => l(t('delete'), 'admin/config/media/image-styles/edit/' . $style['name'] . '/effects/' . $effect['ieid'] . '/delete'),
+      '#type' => 'link',
+      '#title' => t('delete'),
+      '#href' => 'admin/config/media/image-styles/edit/' . $style['name'] . '/effects/' . $effect['ieid'] . '/delete',
     );
   }
 
diff --git modules/menu/menu.admin.inc modules/menu/menu.admin.inc
index b2d8f51..faf62f1 100644
--- modules/menu/menu.admin.inc
+++ modules/menu/menu.admin.inc
@@ -109,20 +109,16 @@ function _menu_overview_tree_form($tree) {
       );
       // Build a list of operations.
       $operations = array();
-      $operations['edit'] = l(t('edit'), 'admin/structure/menu/item/' . $item['mlid'] . '/edit');
+      $operations['edit'] = array('#type' => 'link', '#title' => t('edit'), '#href' => 'admin/structure/menu/item/' . $item['mlid'] . '/edit');
       // Only items created by the menu module can be deleted.
       if ($item['module'] == 'menu' || $item['updated'] == 1) {
-        $operations['delete'] = l(t('delete'), 'admin/structure/menu/item/' . $item['mlid'] . '/delete');
+        $operations['delete'] = array('#type' => 'link', '#title' => t('delete'), '#href' => 'admin/structure/menu/item/' . $item['mlid'] . '/delete');
       }
       // Set the reset column.
       elseif ($item['module'] == 'system' && $item['customized']) {
-        $operations['reset'] = l(t('reset'), 'admin/structure/menu/item/' . $item['mlid'] . '/reset');
-      }
-
-      $form[$mlid]['operations'] = array();
-      foreach ($operations as $op => $value) {
-        $form[$mlid]['operations'][$op] = array('#markup' => $value);
+        $operations['reset'] = array('#type' => 'link', '#title' => t('reset'), '#href' => 'admin/structure/menu/item/' . $item['mlid'] . '/reset');
       }
+      $form[$mlid]['operations'] = $operations;
     }
 
     if ($data['below']) {
diff --git modules/profile/profile.admin.inc modules/profile/profile.admin.inc
index 2d12d1d..249394b 100644
--- modules/profile/profile.admin.inc
+++ modules/profile/profile.admin.inc
@@ -26,8 +26,8 @@ function profile_admin_overview($form) {
     $form[$field->fid]['type'] = array('#markup' => $field->type);
     $form[$field->fid]['category'] = array('#type' => 'select', '#default_value' => $field->category, '#options' => array());
     $form[$field->fid]['weight'] = array('#type' => 'weight', '#default_value' => $field->weight);
-    $form[$field->fid]['edit'] = array('#markup' => l(t('edit'), "admin/config/people/profile/edit/$field->fid"));
-    $form[$field->fid]['delete'] = array('#markup' => l(t('delete'), "admin/config/people/profile/delete/$field->fid"));
+    $form[$field->fid]['edit'] = array('#type' => 'link', '#title' => t('edit'), '#href' => "admin/config/people/profile/edit/$field->fid");
+    $form[$field->fid]['delete'] = array('#type' => 'link', '#title' => t('delete'), '#href' => "admin/config/people/profile/delete/$field->fid");
   }
 
   // Add the category combo boxes
@@ -51,6 +51,7 @@ function profile_admin_overview($form) {
   }
   $form['#tree'] = TRUE;
 
+  // @todo: Any reason this isn't done using an element with #theme = 'links'?
   $addnewfields = '<h2>' . t('Add new field') . '</h2>';
   $addnewfields .= '<ul>';
   foreach (_profile_field_types() as $key => $value) {
diff --git modules/system/system.admin.inc modules/system/system.admin.inc
index 447d4da..935e2c6 100644
--- modules/system/system.admin.inc
+++ modules/system/system.admin.inc
@@ -240,13 +240,8 @@ function system_themes_form() {
     );
     $options[$theme->name] = $theme->info['name'];
 
-    if (drupal_theme_access($theme)) {
-      $form[$theme->name]['operations'] = array('#markup' => l(t('configure'), 'admin/appearance/settings/' . $theme->name) );
-    }
-    else {
-      // Dummy element for drupal_render. Cleaner than adding a check in the theme function.
-      $form[$theme->name]['operations'] = array();
-    }
+    $form[$theme->name]['operations'] = drupal_theme_access($theme) ? array('#type' => 'link', '#title' => t('configure'), '#href' => 'admin/appearance/settings/' . $theme->name) : array();
+
     if (!empty($theme->status)) {
       $status[] = $theme->name;
     }
diff --git modules/system/system.module modules/system/system.module
index 9172bb4..73c3497 100644
--- modules/system/system.module
+++ modules/system/system.module
@@ -448,7 +448,11 @@ function system_element_info() {
   );
   $types['markup'] = array(
     '#markup' => '',
-    '#theme' => 'markup',
+    '#post_render' => array('drupal_post_render_markup'),
+  );
+  $types['link'] = array(
+    '#pre_render' => array('drupal_pre_render_link'),
+    '#post_render' => array('drupal_post_render_markup'),
   );
   $types['fieldset'] = array(
     '#collapsible' => FALSE,
diff --git modules/taxonomy/taxonomy.admin.inc modules/taxonomy/taxonomy.admin.inc
index 42ac67b..274ab07 100644
--- modules/taxonomy/taxonomy.admin.inc
+++ modules/taxonomy/taxonomy.admin.inc
@@ -20,9 +20,9 @@ function taxonomy_overview_vocabularies($form) {
     $form[$vocabulary->vid]['#vocabulary'] = $vocabulary;
     $form[$vocabulary->vid]['name'] = array('#markup' => check_plain($vocabulary->name));
     $form[$vocabulary->vid]['weight'] = array('#type' => 'weight', '#delta' => 10, '#default_value' => $vocabulary->weight);
-    $form[$vocabulary->vid]['edit'] = array('#markup' => l(t('edit vocabulary'), "admin/structure/taxonomy/$vocabulary->vid"));
-    $form[$vocabulary->vid]['list'] = array('#markup' => l(t('list terms'), "admin/structure/taxonomy/$vocabulary->vid/list"));
-    $form[$vocabulary->vid]['add'] = array('#markup' => l(t('add terms'), "admin/structure/taxonomy/$vocabulary->vid/list/add"));
+    $form[$vocabulary->vid]['edit'] = array('#type' => 'link', '#title' => t('edit vocabulary'), '#href' => "admin/structure/taxonomy/$vocabulary->vid");
+    $form[$vocabulary->vid]['list'] = array('#type' => 'link', '#title' => t('list terms'), '#href' => "admin/structure/taxonomy/$vocabulary->vid/list");
+    $form[$vocabulary->vid]['add'] = array('#type' => 'link', '#title' => t('add terms'), '#href' => "admin/structure/taxonomy/$vocabulary->vid/list/add");
   }
 
   // Only make this form include a submit button and weight if more than one
@@ -354,7 +354,7 @@ function taxonomy_overview_terms($form, &$form_state, $vocabulary) {
       unset($form[$key]['#term']['parents'], $term->parents);
     }
 
-    $form[$key]['view'] = array('#markup' => l($term->name, "taxonomy/term/$term->tid"));
+    $form[$key]['view'] = array('#type' => 'link', '#title' => $term->name, '#href' => "taxonomy/term/$term->tid");
     if ($vocabulary->hierarchy < 2 && count($tree) > 1) {
       $form['#parent_fields'] = TRUE;
       $form[$key]['tid'] = array(
@@ -372,7 +372,7 @@ function taxonomy_overview_terms($form, &$form_state, $vocabulary) {
         '#default_value' => $term->depth,
       );
     }
-    $form[$key]['edit'] = array('#markup' => l(t('edit'), 'taxonomy/term/' . $term->tid . '/edit', array('query' => drupal_get_destination())));
+    $form[$key]['edit'] = array('#type' => 'link', '#title' => t('edit'), '#href' => 'taxonomy/term/' . $term->tid . '/edit', '#options' => array('query' => drupal_get_destination()));
   }
 
   $form['#total_entries'] = $total_entries;
diff --git modules/user/user.admin.inc modules/user/user.admin.inc
index ba89ca9..fb646c0 100644
--- modules/user/user.admin.inc
+++ modules/user/user.admin.inc
@@ -192,7 +192,7 @@ function user_admin_account() {
       'roles' => theme('item_list', array('items' => $users_roles)),
       'member_for' => format_interval(REQUEST_TIME - $account->created),
       'access' =>  $account->access ? t('@time ago', array('@time' => format_interval(REQUEST_TIME - $account->access))) : t('never'),
-      'operations' => l(t('edit'), "user/$account->uid/edit", array('query' => $destination)),
+      'operations' => array('data' => array('#link' => array('title' => t('edit'), 'href' => "user/$account->uid/edit", 'query' => $destination))),
     );
   }
   
