The above Ad will no longer appear after you Sign Up for Free!

How To: make HTML tables in the forums

Discussion in 'News' started by dvsDave, Jun 5, 2003.

  1. dvsDave

    dvsDave Benevolent Dictator Administrator Senior Team CB Mods Fight Leukemia

    Messages:
    5,575
    Likes Received:
    786
    Location:
    DC Metro Area
    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
     
    chausman and (deleted member) like this.
  2. Mayhem

    Mayhem Senior Team Emeritus Premium Member

    Messages:
    1,790
    Likes Received:
    5
    Location:
    Australia
    <table width="326" height="130" border="1" cellpadding="0" cellspacing="0">
    <tr><td align="center" width="106" rowspan="3" bgcolor="#FF0000" >T
    H
    A
    N
    K
    S
    </td><td height="43" colspan="2" align="center" bgcolor="#FFFF00">Dave</td>
    </tr><tr><td width="106" height="42" align="center" bgcolor="#00FF00">Works</td>
    <td align="center" width="106" bgcolor="#0000FF">Well</td></tr><tr><td colspan="2" bgcolor="#66FFFF">doesn't like html within the table though, had to use BBCode to format text</td></tr></table>
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice