Creating Visits Blog    Guaranteed Visitors! Creating Visits guarantees great web design and hundreds or even thousands of visits per month OR YOUR MONEY BACK!

Pricing   Building A Website

How to Make an HTML Table


HTML tables are widely used in programming to structure pages. You may not even notice a table being used because there isn’t a border showing, but they’re used to break pages in half or in thirds and so on.

Let’s jump right in. Here’s the basic table format:

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

You can immediately see where the table starts and ends with <table> and </table>. The <tr> and </tr> starts and ends a row and the <td> and </td> start and end a column. It displays this:

Part Number Quantity

From there we can add a few extra rows:

<table>
<tr>
<td>Part Number</td>
<td>Quantity</td>
</tr>

<tr>
<td>ABC</td>
<td>100</td>
</tr>

<tr>
<td>DEF</td>
<td>500</td>
</tr>
</table>

Part Number Quantity
ABC 100
DEF 500

Now let’s add a top row that says the company name, General Electric:

<tr>
<td colspan=”2″>General Electric</td>
</tr>

The extra code in the <td> brackets will turn one column into two colums like this (I also added bold tags around <b>General Electric</b>:

General Electric
Part Number Quantity
ABC 100
DEF 500

You can also turn one row into multiple rows like this:

<td rowspan=”3″></td>

General Electric
Part Number Quantity Free Shipping!
ABC 100
DEF 500

Here is the final code:

<table border=”1″>
<tr>
<td colspan=”3″ align=”center”><strong>General Electric</strong></td>
</tr>
<tr>
<td>Part Number</td>
<td>Quantity</td>
<td rowspan=”3″>Free Shipping!</td>
</tr>
<tr>
<td>ABC</td>
<td>100</td>
</tr>
<tr>
<td>DEF</td>
<td>500</td>
</tr>
</table>

If you can do it yourself please call me and I can help you figure out the code you need. Creating Visits is my NH web design business that also offers NH SEO services if you want to show up in search engines.


Leave a Reply