简体   繁体   English

在 html 中。 当我在一个表中有多个列时,如何在一个列中添加两行?

[英]In html. How can i add two rows in a column when i have multiple columns in a table?

Basically I have:基本上我有:

<tr>
<td>first</td>
<td>second</td>
<td>third</td>
</tr>

How can I add rows thirdA thirdB inside column third?如何在第三列中添加第三行第三行? https://i.stack.imgur.com/wl6FK.png https://i.stack.imgur.com/wl6FK.png

I think I misunderstand your question.我想我误解了你的问题。 Do you mean something like this?你的意思是这样的吗?

 <table> <tr> <td>first</td> <td>second</td> <td><table><tr> <td>ThirdA</td> </tr> <tr> <td>ThirdB</td> </tr></table></td> </tr> </table>

or或者

 <table> <tr> <td>first</td> <td>second</td> <td>ThirdA <br> ThirdB</td> </tr> </table>

or或者

 <table> <tr> <td rowspan=2>first</td> <td rowspan=2>second</td> <td>ThirdA</td> </tr> <tr> <td>ThirdA</td> </tr> </table>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我想在html的行(包含两列)之间的行(三列)中创建多个列。 这个怎么做? - I want to create multiple columns in row(three columns) between rows(contains two columns) in html. how to do this? 如何在我的表中有两行跨越多列,同时仍然与引导程序兼容? - How can I have two rows in my table that span multiple columns, while still being compatible with bootstrap? 我不能在 HTML 中将两个页面链接在一起。? - I can't link two pages together in HTML.? 如何(或可以)将CSS样式添加到HTML中的img。 - How do I ( or can I) add CSS style to an img in HTML. 在 html 中添加属性时出错。 我该如何解决? - Error with adding an attribute in html. How can i do fix it? 我可以在HTML另一个表的两行之间显示一个表吗? - Can i have a table that can appear between two rows of another table in html? 当列标题为垂直时,如何自动设置空 HTML 表格列的宽度? - How can I set width of empty HTML table columns automatically when the column header is vertical? 我可以将一个HTML表头放在两个表列上吗? 喜欢Excel中的合并和中心? - Can I have one HTML table header be over two table columns? Like merge and center in Excel? 如何在一列下方添加多列? - How can I add multiple columns below one column? 当列数变化时,如何使HTML表格的某些列中的所有单元格具有相同的宽度? - How can I make all cells in certain columns of an HTML table have the same width, when the number of columns varies?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM