'How can I combine this 2 cells into one?

I'm trying to combine the cells G and H into one, let's see my code for the follow table:

enter image description here

    <table border="1">
        <thead>
            <tr>
                <th>Header</th>
                <th>Header</th>
                <th>Header</th>
                <th>Header</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td rowspan="5">A</td>
                <td colspan="3">B</td>
            </tr>
            <tr>
                <td colspan="2">C</td>
                <td rowspan="4">D</td>
            </tr>
            <tr>
                <td rowspan="3">E</td>
                <td>F</td>
            </tr>
            <tr>
                <td>G</td>
            </tr>
            <tr>
                <td>H</td>
            </tr>
        </tbody>
    </table>

How can I do? I try to do <td rowspan="2">G</td> but it doesn't work.

What I want is:

enter image description here

Is there a way to make that table I want, using only HTML?



Solution 1:[1]

<table border="1">
        <thead>
            <tr>
                <th>Header</th>
                <th>Header</th>
                <th>Header</th>
                <th>Header</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td rowspan="5" height="100">A</td>
                <td colspan="3" height="20">B</td>
            </tr>
            <tr>
                <td colspan="2" height="20">C</td>
                <td rowspan="4" colspan="1" height="80">D</td>
            </tr>
            <tr>
                <td rowspan="3" height="60">E</td>
                <td height="20">F</td>
            </tr>
            <tr>
              <td height="40">G</td>
          </tr>      
        </tbody>
    </table>

Hi Jean. I don't think you can do this with plain HTML, since you're using 5 rowspan and have only 4 rows. However, you can style it with simple CSS, I'm adding code snippet for example

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 nedoder