# How To: make HTML tables in the forums

#### dvsDave

##### Benevolent Dictator
Senior Team
CB Mods
Fight Leukemia
Ok, I see there have been a couple of instances where a table would be handy to have on a post.

Here's the basics of how to do it.

A tag has two parts:
<table><tr><td>
Code:
<example>
</td><td>
the opening tag, which goes before the part of the code/content that it effects</td></tr><tr><td>
Code:
</example>
</td><td>
and the closing tag, which goes directly after the part of the code/content it effects</td></tr></table><table border=1><tr><td>
Code:
<table>
</table>
</td><td>
this is the first HTML tag you add. This tells the the browser that what is in between this tag is the contents and structure of the entire table.</td></tr><tr><td>
Code:
<tr>
</tr>
</td><td>
This is the Table Row tag and whatever is in between this tag is in ONE row.</td></tr><tr><td>
Code:
<td>
</td>
</td><td>
This is the Table Data tag (also called the table column tag) and inside this tag is where you stick the content.
NOTE: This tag has to be in between the Table Row tags</td></tr><tr><td>
Code:
<tr><td>hello</td><td>test</td></tr>
</td><td>
You can have as many Table Data tags inside a Table Row tag as you need.</td></tr><tr><td>
Code:
<tr>
<td>hello</td>
<td>test</td>
</tr>
<tr>
<td colspan=2>longer</td>
</tr>
</td><td>
But all the Table Rows have to have the same # of colums (td tags) or the difference needs to be accounted for with the colspan=# modifier. It goes inside the td tag, right after the letters "td".</td></tr><tr><td>
Code:
<table border=1>
<tr>
<td>hello</td>
<td>test</td>
</tr>
</table>
</td><td>You can decide whether or not you see a border on your table with the border tag. Usually, for style reasons, I don't show it when I am using it to line up photos with text, but for data, like tables of lighting information, I definitely show it because it's easier to read that way. The modifier goes inside the table tag, right after the letters "table". Example, where it explains the opening and closing tags above, that is in a table, but the table
s border is zero. This table has a border of one.</td></tr>
<tr><td>
Code:
<table><tr><td>hello</td><td>test</td></tr></table>
</td><td>Although, unlike regular HMTL, you can't make the code look pretty by spacing it out, the forums count every little return carriage and they pile up before the table and it looks bad. So, what I do, is to make the code look neat and organized while I type it up, then once it is working, I go back and remove all of the extra spacing and returns.</td></tr><tr><td>
Code:
<tr>
<td>hello</td>
<td>test</td>
</tr>
<tr align=center>
<td colspan=2>longer</td>
</tr>
</td><td>
The align=center modifier is great for lining up columns of numeric data. It goes inside the tr or td tag, right after the letters "tr"or "td".</td></tr></table>

There are a ZILLION guides to HTML and tables on the internet. If you start using them and find that the forums aren't allowing you to use a tag you want to use, let me know by senting me a private message. Hope to see you taking advantage of tables soon!

-dvsDave