How to Alter a Table to Add Columns
- 1). Open your HTML file that contains the table. HTML is plain text, so you can use a simple, free text editor such as Notepad to add columns to your table.
- 2). Scroll down to the HTML section that contains your table. A table starts with the "<table>" tag and ends with "</table>." Table rows and columns are defined within these two tags. Current columns are shown in the "<td>" and "</td>" tags.
- 3). Add columns to your table. Each "<td>" tag you add to the HTML code creates a new column for your table. Below is an example of a table with two columns:
<table>
<tr>
<td>Table column 1</td>
<td> Table column 2</td>
</tr>
</table>
To add columns to this table, add "td" tags within the "tr" tags. Below adds two more columns to the table, to make a total of four columns in the table:
<table>
<tr>
<td>Table column 1</td>
<td> Table column 2</td>
<td> Table column 3</td>
<td> Table column 4</td>
</tr>
</table> - 4). Save the changes to the file and open it with your Internet browser. The table is laid out on your page, and it contains each new column in each row.