I do like this on my document ready:
$("thead").addClass("ui-state-default");
$("tbody").addClass("ui-state-highlight");
And I noticed that the class is added also to the tables that don’t have tbody, I tested on all browsers. Should I ever bother to write tbody when i generate/write my HTML?
Yes, I would include
<thead>and<tbody>elements to ensure consistency, just in case you run into some browser out there that does not automatically generate them for you.