How to add inline Styles in Java Mail without breaking a line

3232 views html
5

I want to add inline following inline style for a given text inside a java mail.if i add like this output as follows.

<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

What i want is 1978 in red ) black in the same row.

answered question

Have you tried to use div or span instead of paragraph

1 Answer

4

This what you have:

<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>

Instead you can use the following:

<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>

posted this

Have an answer?

JD

Please login first before posting an answer.