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.
<table width="500" border="0"> <tr> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> </tr> </table> HTML: That's a two column table .
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):