0

Can i use <div> tag inside table ?

still wondering if i was able to stylizing each tr / td tag with different css style using div like <table> <tr> <div class="style1"><td>content</td></div> <div id="just1"><td>content</td></div> <div class="style1"><td>asdr</td></div> </tr> </table> can the code work? or if it won't, how to stylizing css inside table? or is there a better way to do it?

7th Dec 2016, 7:26 AM
Firman Nurdiansyah
Firman Nurdiansyah - avatar
5 Answers
+ 3
You may have view problems but not errors. The html is versatile but td inside div is a error for w3c standard. You can apply style directly to td: <td class="style">
7th Dec 2016, 8:01 AM
AtoMX
AtoMX - avatar
+ 1
appreciated for the answer
7th Dec 2016, 10:44 AM
Firman Nurdiansyah
Firman Nurdiansyah - avatar
+ 1
Yes
7th Dec 2016, 5:14 PM
Evaristo Rivero
Evaristo Rivero - avatar
0
Yes you can.
7th Dec 2016, 10:42 AM
Christian Roth
Christian Roth - avatar
0
you can,but that's not not best way....for some reasons...better use more blocks(div) instead of tables (tables only for realy simple tables)
22nd Feb 2017, 8:40 PM
Rose Sevenyears
Rose  Sevenyears - avatar