If you don't want to add the class by hand, you can write a script like
JavaScript
var tdList = document.querySelectorAll('#mytable td');
[].forEach.call(tdList, function(el){
el.classList.add('text-center');
});
jQuery:
$('#mytable td').addClass('text-center');
If not, you can achieve similar effect by adding the following in CSS:
#mytable td {
text-align: center;
}
Also, if you use a smart text editor like sublime or brackets which support multiple cursors, you can simply select all <td>
using mouse and write class="text-center"
just once. For example in brackets you can do so by holding Ctrl and clicking the place where you want to add cursor.
If you install an extension like emmet, you can simply write
#mytable>td.text-center*40
and press Ctrl+AltEnter, you can generate the entire markup. Really, if you're lazy to type... they are lots of ways.