How to add color to some words in a text in html?

For example, I want to add color=red to the phone and email, enclosed by . It seems I can’t use an embedded to add color. If I don’t use CSS, how can I directly add color to it?

<p>For appointment, please call Martin at <strong>xxx-xxx-xxxx</strong> or email at <strong>support@test.com.</strong></p>

>Solution :

You can use inline-styling for this purpose

<p>For appointment, please call Martin at <strong style="color:red">xxx-xxx-xxxx</strong> or email at <strong style="color:red">support@test.com.</strong></p>

If you want you can add additional styling properties in style attribute of HTML Element by separating properties with ;

Leave a Reply