1. Home
  2. Computing & Technology
  3. Web Design / HTML

How do you build an HTML table from scratch?

By , About.com Guide

Question: How do you build an HTML table from scratch?
HTML tables can be very tricky to build in a text editor, but once you learn how to build them you'll be glad you did. Knowing HTML tables is a good indication that you're an intermediate or advanced HTML author.
Answer:

HTML tables require only three tags to build:

The best way to start is to think about tables as being a group of cells in a row, and a group of rows in a table.

First create the table:

<table> </table>

Then, within that table, create your first row:

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

Finally, create your cells within the row:

<table>
<tr> <td> </td> </tr>
</table>

And then add the text within the cell:

<table>
<tr><td>cell 1</td></tr>
</table>
Explore Web Design / HTML
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Web Design / HTML

©2009 About.com, a part of The New York Times Company.

All rights reserved.