user1981730
user1981730

Reputation: 89

HTML table format issue

I currently have a code that looks something like this:

<table border="1">
  <tbody>
    <tr>
      <td></td>
      <td></td>
    </tr>
    <tr>
      <td></td>
      <td></td>
    </tr>
  </tbody>
</table>

I want to alter it so the format looks something like this:

https://i.sstatic.net/1xvmZ.png

However, it seems like whatever I try, just does not work out. How can I alter my code to make my table look like the one in the image? The CSS, sizes, and shapes don't matter, I'm just struggling to get the correct template.

Upvotes: 1

Views: 117

Answers (2)

user1634459
user1634459

Reputation:

What you're missing is a rowspan tag. Insert the following just after the tbody tag:

<tr>
<td rowspan="2"></td>
</tr>

Upvotes: 1

greener
greener

Reputation: 5069

Try using rowspan:

<table border="1">
  <tbody>
    <tr>
      <td rowspan="2"></td>
    </tr>
    <tr>
      <td></td>
      <td></td>
    </tr>
  </tbody>
</table>

Upvotes: 3

Related Questions