Add class to column in a table I have a table in a form such as the 'user_admin_account' form. In one of the TD's I want to add a class, how do I do this the most convenient way? 

This is what I currently have, it doesn't seem to work

$row = array(
  'title' =&gt; array(
    'data' =&gt; array(
      '#title' =&gt; $name . ' ' . $surname,
      '#attributes' =&gt; array(
        'class' =&gt; array(
          'myClass',
        ),
      ),        
    ),
  ),
  'date' =&gt; date('Y-m-d', $account-&gt;created),
  'name' =&gt; $name . ' ' . $surname,
);
The variables for theme_table() are structured differently to a standard render array, so you need to format your array slightly differently:

$row = array(
  'title' =&gt; array(
    'data' =&gt; $name . ' ' . $surname,
    'class' =&gt; array('myClass')
  ),
  'date' =&gt; date('Y-m-d', $account-&gt;created),
  'name' =&gt; $name . ' ' . $surname,
);


The above produces:

&lt;table&gt;
  &lt;tbody&gt;
    &lt;tr class="odd"&gt;
      &lt;td class="myClass"&gt; &lt;/td&gt;
      &lt;td&gt;1970-01-01&lt;/td&gt;
      &lt;td&gt; &lt;/td&gt; 
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;


The first and last column are only empty as my test environment doesn't have the same variables defined as in your code.