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

How do you build an HTML table from scratch?

By Jennifer Kyrnin, About.com

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>

More Web Design / HTML Q&A

Explore Web Design / HTML

More from About.com

  1. Home
  2. Computing & Technology
  3. Web Design / HTML
  4. HTML and XHTML
  5. XHTML
  6. Tables
  7. How do you build an HTML table from scratch - Build HTML tables

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

All rights reserved.