简体   繁体   中英

two column html table with group

I expect next to name column is besides iphone, why my table doesn't work as expected?

 <table> <tbody> <tr> <td> <tr> <td>Name:</td> <td>iphone</td> </tr> <tr> <td>Price:</td> <td>123</td> </tr> <tr> <td>Qty</td> <td>1</td> </tr> </td> <td>next to name:</td> <td>12345</td> </tr> </tbody> </table> 

You can't write tr inside of td . You can add table wrapper for the <tr>

 <table border='1'> <tbody> <tr> <td> <table> <tr> <td>Name:</td> <td>iphone</td> </tr> <tr> <td>Price:</td> <td>123</td> </tr> <tr> <td>Qty</td> <td>1</td> </tr> </table> </td> <td>next to name:</td> <td>12345</td> </tr> </tbody> </table> 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM