15

<span>またはタグを使用してインラインでスタイリングしているので、毎回タグを閉じて再度開くのではなく、<p>実際の古い学校に行き、<br><br>段落を分割するために使用する必要がありますか?<p>

たとえば、これは私が現在持っているコードのスニペットであり、非常に冗長です。それがインラインでコーディングする必要があることの性質であることは知っていますが、次のことを行うことでノイズを減らすことができるようです<br><br>

<p style="font-size: small; font-family:Tahoma, Geneva, sans-serif">Selection of the 200 New &amp; Recently updated companies over the last month. Click on the company name for up-to-date business information.</p>
<p style="font-size: small; font-family:Tahoma, Geneva, sans-serif">Company Name, FL provider of Category was updated on 2/12/2013</p>
<p style="font-size: small; font-family:Tahoma, Geneva, sans-serif">Company Name, TX provider of Category was updated on 2/13/2013</p>
<p style="font-size: small; font-family:Tahoma, Geneva, sans-serif">Company Name, AK provider of Category was updated on 2/15/2013</p>

に該当する場合、これの一部を切り替えることの欠点はあり<br><br>ますか? メールクライアントサポートか何か?

4

2 に答える 2

11

改行タグを自由に使用してください。この方法でマークアップを削減できる可能性があることは既に認識しており、これを行うことによる不利益はありません。すべての電子メール クライアントと Web クライアントはそれらをサポートしており、マージンはすべてのシステムで包括的にサポートされているわけではないため、段落タグでマージンを使用するよりも信頼性が高くなります。

参考: http: //www.campaignmonitor.com/css/

于 2013-02-28T14:25:33.017 に答える
6

すべてのテキストの間に二重<br>タグを使用します。これは、電子メールの最も一貫したオプションです。

&nbsp;一部のクライアント (Outlook だと思います) では空行が圧縮されるため、テキストの上部と下部にある「ただし」とペアにする必要があります。次に例を示します。

<td>
&nbsp;<br>
The no break space is needed above and below the text where it meets the table cell.
<br><br>
double br's between paragraphs are the best way to do it.
<br><br>
You need 1 no break space per line at the bottom (and top) so that Outlook doesn't remove the text row.
<br>&nbsp;<br>&nbsp;
</td>

これが最も速い方法ですが、行の高さの倍数に制限されます。別のオプションは、パディングを使用することです。

<td style="padding-top:15px; padding-bottom:30px;">
The no break space is needed above and below the text where it meets the table cell.
<br><br>
double br's between paragraphs are the best way to do it.
<br><br>
You need 1 no break space per line at the bottom (and top) so that Outlook doesn't remove the text row.
</td>

line-height が 15px に設定されていると仮定すると、これらの方法はどちらも同じ結果を生成し、すべての主要な電子メール クライアントで広くサポートされています。

于 2013-03-01T16:40:41.857 に答える