如何在不中断行的情况下在Java Mail中添加内联样式

时间:2018-11-06 10:46:20

标签: html css styles javamail

我想在Java邮件中为给定的文本添加以下内联样式的内联样式。

<p>Please check the attachement to download the promotion letter with the password of your </p>" +"<b>"+ "NIC No + Birth Year (Example : 786083518 "+" <p style=\"color:red;\">1978)</p>" +"</b>"

enter image description here

我要的是1978年的红色)黑色的同一行。

1 个答案:

答案 0 :(得分:1)

您所拥有的:

<p>Please check the attachement to download the promotion letter with the password of your </p><b>NIC No + Birth Year (Example : 786083518 <p style="color:red;">1978)</p></b>

您可以使用以下内容:

<p>Please check the attachement to download the promotion letter with the password of your <b>NIC No + Birth Year (Example : 786083518 <span style="color:red;">1978)</span></b></p>