如何在HTML之后和之内创建换行符?<table> </table>

时间:2015-04-09 04:10:04

标签: html css css3

我尝试在表格中的每个实例后创建换行符。我怎么能这样做呢?

<table width="22%" height="18%" align="right" background='../images/table1.png'>
<center>
<tr width = '25%' height = '75px'>

<td>
<p><b><font face='arial'>Title:</font></font> <i>output</i></font></b></p>
</td>

<td>
<p><b><font face='arial'>Title:</font></font> <i>output</i></font></b></p>
</td>

</tr>
</center>
</table>

2 个答案:

答案 0 :(得分:1)

为此,您必须制作如下结构:

<table width="22%" height="18%" align="right" background='../images/table1.png'>
<center>
<td>
  <b><font face="arial">Title:</font></b></td> <td><i>output</i>
</td>
</tr>
<tr>
<td>
<b><font face="arial">Title:</font> </b></td> <td> <i>output</i>
</td>

</tr>
</table>

检查Fiddle Here.

修改

<tr>

  <td>
  <b><font face="arial">Title:</font></b></td> <td><i>output</i>
</td>
</tr><p></p>
<tr>
<td>
<b><font face="arial">Title:</font> </b></td> <td> <i>output</i>
</td>

</tr>

答案 1 :(得分:0)

在这里,试试this

我使用了this表教程,并将其调整为您的代码。这是HTML:

<table width="22%" height="18%" align="right" background="../images/table1.png">
  <center>
  <tr>
    <td><p><b><font face='arial'>Title:</font></font></td>
    <td><i>output</i></td>
  </tr>
  <tr>
    <td><p><b><font face='arial'>Title:</font></font></td>
    <td><i>output</i></td>
  </tr>
</table>
</center>