How to theme table inside vertical tabs?
Not sure if it's the right way to do, but you would create a new form element with the table, instead of adding a table directly.

function theme_tabletabs_form($variables) {

      // ....

      $header = array(t('x'), t('y'));

      // each ID has to be unique
      $table_id = 'tabletabs' . '-' . $id_tab;

      // create a new form element with the table
      $form['tabs'][$id_tab]['table']['#markup'] = theme('table', array(
        'header' =&gt; $header,
        'rows' =&gt; $rows,
        'attributes' =&gt; array('id' =&gt; $table_id),
      ));
    }
  }
  $output .= drupal_render_children($form);
  return $output;
}


Option #2:

function theme_tabletabs_form($variables) {

      // ....

      $header = array(t('x'), t('y'));

      // each ID has to be unique
      $table_id = 'tabletabs' . '-' . $id_tab;

      // set the table as a value of each vertical tab item
      $form['tabs'][$id_tab]['#value'] = theme('table', array(
        'header' =&gt; $header,
        'rows' =&gt; $rows,
        'attributes' =&gt; array('id' =&gt; $table_id),
      ));
    }
  }
  $output .= drupal_render_children($form);
  return $output;
}


This will give following output: