Is there a way I can change colspan of td using CSS or this needs to be done only in html?
It's an HTML only property:
<td colspan="2">
There is no CSS equivalent of this (as far as I know.)