0

How to apply different colors in the same word? (in HTML5)

The answer may be this: <font color="__">a</font>bc But in HTML5 many tags and attributes are depreciated, including <font>, and we should use CSS3 instead(inside "style" attribute or tag). Well, if we write: <div style="color:__"> a</div>bc "a" and "bc" will no longer be in the same line, they will be separated So how to keep them "connected" with coloring the first letter, without using deprecated tags?

5th Mar 2022, 10:11 AM
Eyad Al-Ahmar
Eyad Al-Ahmar - avatar
4 ответов
+ 1
Mirielle That is a great method! Thank you for your answer and code.
5th Mar 2022, 11:12 AM
Eyad Al-Ahmar
Eyad Al-Ahmar - avatar
0
I don't really get your question but try this <style> body{color:red;} </style>
5th Mar 2022, 10:41 AM
Chigozie Anyaeji 🇳🇬
Chigozie Anyaeji 🇳🇬 - avatar
0
<div><span>H</span>ello</div>
5th Mar 2022, 2:12 PM
Shadoff
Shadoff - avatar