About rowspan

2
<p align="center">
            <table border="1" cellspacing="0" cellpadding"2">

            <tr><td colspan="2">Tabela de Caracteristicas</td></tr>

            <tr> **<td>rowspan="4"</td>** <td>Philips</td> <td align="center">Altura</td> <td>115,5 mm</td> 



        <!-- o rowspan não esta querendo funcionar aqui na td -->

        </tr>
        <tr> <td align="center">Largura</td> <td>90,45 mm</td></tr>
        <tr> <td align="center">Profundidade</td><td>5 cm</td></tr>
        <tr> <td align="center">Peso</td><td>400 gr</td> </tr>

        </table>    
    </p>    

I do not know what's missing here so that the table and its dimensions can open a space on the left of 4 lines to stay as an empty cube with the word Philips, this taking the place of four lines.

I need help. Thank you in advance, who can help me.

<p align="center">
			<table border="1" cellspacing="0" cellpadding"2">
			
			<tr><td colspan="2">Tabela de Caracteristicas</td></tr>
			
			<tr> <td>rowspan=""</td> <td>Philips</td> <td align="center">Altura</td> <td>115,5 mm</td> 
			
			<!-- o rowspan não esta querendo funcionar aqui na td -->
			
			</tr>
			<tr> <td align="center">Largura</td> <td>90,45 mm</td></tr>
			<tr> <td align="center">Profundidade</td><td>5 cm</td></tr>
			<tr> <td align="center">Peso</td><td>400 gr</td> </tr>
			
			</table>	
		</p>	
    
asked by anonymous 25.03.2018 / 11:16

2 answers

2

They serve to indicate that a particular td will expand by a specific amount of rowspan or colspan beyond the space it would already occupy in the table.

For example, "colspan = 3" will cause td to take two (1 + 2) plus two td space to the right of it:

<table border='1'>
    <tr>
        <td>a</td><td>b</td><td>c</td><td>d</td>
    </tr>
    <tr>
        <td colspan=3>e</td>
        <td>f</td>
    </tr>
    <tr>
        <td>g</td><td>h</td><td>i</td><td>j</td>
    </tr>
</table>

Just like "rowspan = 3" will take you to the space of three (1 + 2) td beneath it:

<table border='1'>
    <tr>
        <td rowspan=3>a</td>
        <td>b</td><td>c</td><td>d</td>
    </tr>
    <tr>
        <td>e</td><td>f</td><td>g</td>
    </tr>
    <tr>
        <td>g</td><td>h</td><td>i</td>
    </tr>
</table>

They can still be used together to occupy both the right and bottom space:

<table border='1'>
    <tr>
        <td>a</td><td>b</td><td>c</td><td>d</td>
    </tr>
    <tr>
        <td>e</td>
        <td colspan=2 rowspan=2>f</td>
        <td>g</td>
    </tr>
    <tr>
        <td>g</td>
        <td>h</td>
    </tr>
</table>

That is, they are analogous to the commands to merge cells into spreadsheets and word processors.

    
25.03.2018 / 16:18
1

Try it out:

<p align="center">
<table border="1" cellspacing="0" cellpadding"2">
  <th colspan=3>Tabela de Caracteristicas</th>

  <tr>  
    <td rowspan=4>Philips</td>
    <td align="center">Altura</td>
    <td>115,5 mm</td> 
  </tr> 

  <tr>
    <td align="center">Largura</td>
    <td>90,45 mm</td> 
  </tr> 

  <tr> 
    <td align="center">Profundidade</td>
    <td>5 cm</td>
  </tr> 

  <tr>
    <td align="center">Peso</td>
    <td>400 gr</td>
  </tr> 
</table>    
</p>    
    
25.03.2018 / 17:13