Computer scienceFrontendHTMLBasic TagsTables

Tables: Merging cells

Syntax

Report a typo

Select all the correct options for merging cells in tables.

A)

<table border="1">
  <tr>
    <th>Name</th>
    <th col="2">Email</th>   
  </tr>
  <tr>
    <td>John Doe</td>
    <td>[email protected]</td>    
    <td>[email protected]</td>
  </tr>
</table>

B)

<table border="1">
  <tr>
    <th>Name</th>
    <th colspan="2">Email</th>   
  </tr>
  <tr>
    <td>John Doe</td>
    <td>[email protected]</td>    
    <td>[email protected]</td>
  </tr>
</table>

C)

<table>
  <tr>
    <th>Name</th>
    <th>Email</th>   
  </tr>
  <tr>
    <td rowspan="2">John Doe</td>
    <td>[email protected]</td>
  </tr>
   <tr>   
    <td>[email protected]</td>
  </tr>
</table>

D)

<table border="1">
  <tr>
    <th>Name</th>
    <th>Email</th>   
  </tr>
  <tr>
    <td row="2">John Doe</td>
    <td>[email protected]</td>
  </tr>
   <tr>   
    <td>[email protected]</td>
  </tr>
</table>
Select one or more options from the list
___

Create a free account to access the full topic