Kellin Quinn
Kellin Quinn

Reputation: 11

How can I create line breaks after <td> and within <table> in HTML?

I'm trying to create line breaks after each instance within a table. How can I go about doing this?

<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>

Upvotes: 1

Views: 2462

Answers (2)

ketan
ketan

Reputation: 19341

For that you have to make structure like following:

<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>

Check Fiddle Here.

Edit:

<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>

Upvotes: 1

Blake
Blake

Reputation: 84

Here, try this.

I used this table tutorial and just adjusted it to your code. Here's the 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>

Upvotes: 0

Related Questions