HTML and CSS Reference
In-Depth Information
Setting Breaks in Text
Often, the easiest way to make small changes to how a table is laid out is by using line
breaks ( <br /> elements). Line breaks are particularly useful if you have a table in
which most of the cells are small and only one or two cells have longer data. As long as
the screen width can handle it, generally the browser just creates really long rows. This
looks rather funny in some tables. For example, the last row in the table shown in Fig-
ure 10.15 is coded as follows:
Input
<tr>
<td> TC </td>
<td> 7 </td>
<td> Suspicious except when hungry, then friendly </td>
</tr>
.
Output
FIGURE 10.15
A table with one
long row.
By putting in line breaks, you can wrap that row in a shorter column so that it looks
more like the table shown in Figure 10.16. The following shows how the revised code
looks for the last row:
Input
<tr>
<td> TC </td>
<td> 7 </td>
<td> Suspicious except <br />
when hungry, <br />
then friendly </td>
< /tr >
 
 
Search WWH ::




Custom Search