我知道我可以在 Java 文档中使用 html 标签。如何为每个单元格添加带边框的表格?我希望单元格像真正的表格一样对齐。我知道像
这样的基本标签<table>
<tr>
<td> cell 11 </td> <td> cell 21</td>
</tr>
<tr>
<td> cell 12 </td> <td> cell 22</td>
</tr>
</table>
那么如何添加边框并保持表格列的宽度相同呢?
最佳答案
将@RP 的评论放在答案中,您可以像这样使用 table
的 border
属性:
<table border="1">
<tr>
<td> cell 11 </td> <td> cell 21</td>
</tr>
<tr>
<td> cell 12 </td> <td> cell 22</td>
</tr>
</table>
关于java - 在 javadoc 中为每个单元格添加带边框的表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40251478/