【发布时间】:2020-06-26 00:55:52
【问题描述】:
我有一个小的 html 代码,它在通过浏览器运行时给出了预期的输出,但是当我在 Outlook 电子邮件中使用它时却没有。
<html>
<head>
<style>
</style>
</head>
<body>
<table border=1 cellspacing=0 cellpadding=0><tr>
<td style="padding-left:50;"></td>
<td style="display:block;text-align: left;vertical-align: top;height:150; width:500;margin:0">
<a href=https://www.mytitlelink>
<p style="font-size:12px;font-family:Graphik;color:blue;text-decoration: underline;
font-weight:bold;vertical-align:top;margin:0">This is my title here</p></a>
<p style="font-size:12px;font-family:Graphik;color:black;margin:0">
Here goes my text. Figuring a way to remove leading blank link above title and reduce the spacing between title and this text. Tried using line-spacing, margin, padding but no luck. Everything works fine when access this html text through browser but troubling me when the same is used with inthe outlook email.
Here goes my text
Here goes my text ...<a href=https://www.mytitlelink> read more</a></p>
<p style=" font-size:12px;font-family:Graphik;color:black;">Source:MySource<br>Published On:Date</p>
</td>
</tr></table>
</body>
</html>
使用 Outlook 电子邮件时,无法摆脱标题顶部的前导空白行以及标题和文本之间的行距。
附上屏幕截图 Output from Outlook Email Output from browser
浏览了不同的链接并理解电子邮件中的 html 代码的行为与浏览器不同,但没有找到解决方案。
【问题讨论】: