How to make td (cell) from html table expand for the row to fit in one line?

aF. picture aF. · Jun 1, 2012 · Viewed 26.2k times · Source

In some html cells (td) the text is wrapped because the size of the column is smaller than the size of the text on the cell. I don't want the text to be wrapped, I want the column width to expand so the wrapping don't happen!

How can I do that?

One final note, I only can use html code, no css :(

Answer

Josh Siok picture Josh Siok · Jun 1, 2012

Confusing question, but I think you might be looking for the colspan="x" attribute.

<table>
   <tr>
      <td>1</td>
      <td>2</td>
   </tr>
   <tr>
      <td colspan="2">fills both columns</td>
   </tr>
</table>