+ 6

Why we can't include <td> tag before <tr> tag?

for example: <table> <td> <tr> sam</tr> <tr>good</tr> </td> </table> The output should be : sam good but it don't happen.

20th Jul 2020, 11:52 AM
The future is now thanks to science
The future is now thanks to science - avatar
3 odpowiedzi
+ 2
What's the reason you want td precedes tr, against the standard format?
20th Jul 2020, 12:19 PM
Calviղ
Calviղ - avatar
+ 2
I thought that we use td tag for going another column and use tr tag for going another row. So if we use a td tag and under td tag if we use multiple tr tag , for every tr tag the program will go another row of that column.
20th Jul 2020, 2:57 PM
The future is now thanks to science
The future is now thanks to science - avatar
+ 2
tr tag is a row creator tag that create a row and contains cells not text . it contains element node (th and td) not text node. you are coding to get so. which is not possible. you have to code two tr with td in each tr to get your desired result.
21st Jul 2020, 10:22 AM
Divya Mohan
Divya Mohan - avatar