I am creating an HTML email as
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<img src="image.jpg" width="x" height="y" style="margin:0; padding:0; display:block;">
</td>
</tr>
<tr>
<p>Para with lots of text</p>
</tr>
</table>
However an unnecessary space is left at the bottom of the image when seen in Internet Explorer. How can I get rid of this space?
This isn’t a bug or anything like that.
Depending on the doctype in use, different browsers apply specific values to margin, padding, and border to various elements.
Looking at your code I don’t see where you set the border on the image to 0. Do this.
Generally speaking the best doctype to use is simply
<!DOCTYPE html>This results in standards mode across pretty much all browsers. Once you have that there are only a few minor tweaks (such as image border) that you need to do to ensure total compliance.Next, a paragraph tag is invalid inside of a TR. You are missing a TD as Sparky672 pointed out.