How to apply colors to fonts in HTML ?? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

How to apply colors to fonts in HTML ??

I want to change the colour of the background and want to make the fonts colourful...

28th Jan 2020, 9:29 AM
Kamal Jain
Kamal Jain - avatar
9 Answers
+ 4
html5 ? the most direct way is to use inline css <span style="color: pink">pink text</span>
28th Jan 2020, 9:36 AM
Taste
Taste - avatar
+ 6
HTML code: <p class="ara">I am a sololearner</p> CSS code: .ara{ color:green; }
28th Jan 2020, 11:04 AM
ISTIAQUE ZAMAN
ISTIAQUE ZAMAN - avatar
+ 2
Use CSS.
28th Jan 2020, 9:50 AM
Sonic
Sonic - avatar
+ 1
You can do it with CSS . ex. inline CSS <p style="color:red";>Red Text</p>
28th Jan 2020, 2:17 PM
Ali Khazaee
Ali Khazaee - avatar
+ 1
HTML code: <p id="intro">I love football</p> CSS code: #intro{ color:red; }
29th Jan 2020, 11:11 AM
BOSIRE J.N
BOSIRE J.N - avatar
+ 1
<h1 style="color:pink">Hii<h1> <p style="color:pink">Hii<p>
29th Jan 2020, 1:45 PM
Dhananjay Chaudhary
Dhananjay Chaudhary - avatar
0
Thanks bro 🙏
28th Jan 2020, 9:47 AM
Kamal Jain
Kamal Jain - avatar
0
or you can use this <font color="red">This is some text!</font>
28th Jan 2020, 9:53 AM
DannyTheGod101
DannyTheGod101 - avatar
0
<!DOCTYPE.HTML> <html> <head> <body bgcolor font-family; font-color:#FF00FF;> <h1><marquee>Hello World</h1> </html> </head> </body>
30th Jan 2020, 9:08 AM
Kira Yamato