HTML 电子邮件在 Outlook 中显示错误

Wrong display of HTML email in Outlook

我有以下用于 HTML 电子邮件的代码:

<div style="background-color:red;max-width:600px;height:140px;margin-left:auto;margin-right:auto;">

<img src="https://via.placeholder.com/140x99" height="140" width="99" style="height:140px;width:99px;display:block;border:0;float:right;margin:0px;padding:0px;">

<p style="margin:0;font-size:30px;font-weight:700;padding-left:10px;margin-top:0px;padding-top:10px;">This is an important example header!</p>

</div>

我希望 HTML 呈现如下:

文字在左边,图片在右边,与红色父元素高度相同

我用 Email On Acid 的所有 86 个电子邮件呈现器对此进行了测试。 HTML 代码在几乎所有电子邮件客户端上都能正确呈现。

但在以下电子邮件客户端上显示错误:

Outlook Office 356 (Windows 10)
Outlook 2007 (Windows 7)
Outlook 2010 (Windows 7)
Outlook 2013 (Windows 7)
Outlook 2016 (Windows 10)
Outlook 2019 (Windows 10)

我得到以下输出:

你看,图片在左边,文字在图片下方。

如何使 Outlook 电子邮件客户端的输出也正确?

在图像上应用 align="right"

注意:我不能 100% 确定它是否有效,因为我目前无法访问 Acid 上的电子邮件。

<div style="background-color:red;max-width:600px;height:140px;margin-left:auto;margin-right:auto;">

<img src="https://via.placeholder.com/140x99" align="right" height="140" width="99"
style="height:140px;width:99px;display:block;border:0;float:right;margin:0px;padding:0px;">

<p style="margin:0;font-size:30px;font-weight:700;padding-left:10px;margin-top:0px;padding-top:10px;">This is an important example header!</p>

</div>

我终于得到了这段代码,它也适用于 Outlook:

<center>

<!--[if !mso]><!-->
<table style="background-color:red;max-width:600px;height:140px;margin-left:auto;margin-right:auto;border-spacing:0px;">
<!--<![endif]-->
<!--[if mso]>
<table style="background-color:red;width:600px;height:140px;margin-left:auto;margin-right:auto;border-spacing:0px;align:center;">
<![endif]-->

<tbody>
<tr>
<td style="margin:0;font-size:30px;font-weight:700;padding-left:10px;width:100%;">This is an important example header!</td>
<td style="margin:0px;padding:0px;"><img src="https://via.placeholder.com/140x99" height="140" width="99" style="height:140px;width:99px;border:0;margin:0px;padding:0px;display:block;"></td>
</tr>
</tbody>
</table>

</center>