How do I get the image centered on the table

1
                      <html>
              <head>
                <title> Teste inicial </title>
              </head>
               <body>
                  <table style= "width:480" "height:480" border="1">
               <tr>
               <th colspan="2" > Nome Principal </th>
               </tr>
               <tr> 
<td> Lacuna 1</td>
<td> Lacuna 2 </td> 
  </tr>
  <tr>
      <td height="80" > Lacuna 3</td>
  <td height="80" > Lacuna 4 </td> 
  </tr>
  <tr>
    <td colspan="3">
      <table border ="5">
        <tr>
          <td colspan="2"><img src="instagram-1581266_960_720.jpg " style="width:180px;">
          </td>
        </tr>
      </table>
    </td>

  </tr>

    
asked by anonymous 14.10.2017 / 07:49

2 answers

0

Put in <td> the centralized alignment:

<td align="center">
   <img src="uma_imagem.jpg" />
</td>
    
14.10.2017 / 08:15
0

The DvD response is correct but I recommend you follow the W3C standards for HTML5.2 because at some point this format used to align will not be supported by browsers and you will have to redo your site again as this format is already deprecated since HTML 5.0, as well as all attributes of only visual meaning, because there is CSS for this and the image question is also wrong because according to W3C every image must have alt alt text and with that the right code would be like this:

<td style="text-align:center;">
   <img src="minhaImagem.jpg" alt="Está é uma imagem de alguma coisa"/>
</td>
    
14.10.2017 / 11:52