HTML noob needs some help

Discussion in 'HTML & Website Design' started by Zlyfe, Mar 24, 2008.

  1. #1
    My computer science teacher gave us this problem, but it involves HTML and we haven't even learned it yet, so I was wondering if some of you could help me out.



    So can anyone show me how to do create that table with HTML?

    The language we're using is Python, btw.

    Thanks in advance.
     
    Zlyfe, Mar 24, 2008 IP
  2. Marc Fraser

    Marc Fraser Peon

    Messages:
    283
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    
    <table width="500" border="0">
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
    </table>
    
    HTML:
    That's a two column table ;).
     
    Marc Fraser, Mar 24, 2008 IP
  3. ajsa52

    ajsa52 Well-Known Member

    Messages:
    3,426
    Likes Received:
    125
    Best Answers:
    0
    Trophy Points:
    160
    #3
    Odd rows will have 2 cells, but even rows only 1.
    So you need to use the "colspan" property for even rows.
    Example:
    
    <table>
      <tr> <!-- odd -->
        <td>name 1</td>
        <td>name 2</td>
      </tr>
      <tr colspan="2"> <!-- even -->
        <td><img src="http://www.yoursite/pic/picture1.jpg" width="480px" height="360px" alt="Picture 1" border="0"/></td>
      </tr>
      <tr> <!-- odd -->
        <td>name 3</td>
        <td>name 4</td>
      </tr>
      <tr colspan="2"> <!-- even -->
        <td><img src="http://www.yoursite/pic/picture2.jpg" width="480px" height="360px" alt="Picture 2" border="0"/></td>
      </tr>
    </table>
    
    Code (markup):
     
    ajsa52, Mar 24, 2008 IP