Home > Article > Web Front-end > How do I change the text color of specific words in HTML?
<p>Enter the competition by January 30, 2011 and you could win up to $$$$ — including amazing summer trips!</p><p>To change the color of "January 30, 2011" to red and "summer" to blue, you can apply the following inline CSS:
<p><p>Alternatively, you can use CSS classes to achieve the same effect:
<p> Enter the competition by January 30, 2011 and you could win up to $$$$ — including amazing summer trips!<p>By utilizing these methods, you can easily customize the appearance of your text strings within HTML documents, making them more visually engaging and informative for users.
The above is the detailed content of How do I change the text color of specific words in HTML?. For more information, please follow other related articles on the PHP Chinese website!