+ 1

how can we add colors to text?

15th Jul 2016, 1:22 PM
Deepak Sharma
Deepak Sharma - avatar
5 Antworten
+ 4
Through CSS: body { color: green; } 'body' is just an example. It could be any text content element.
15th Jul 2016, 2:54 PM
ZinC
ZinC - avatar
+ 1
HTML can able change the font colour and also the background colour. To change the colour of the font use the below code: <font color="#FF0000"> This changes the font colour to red. To change to other colours then use the corresponding colour code. For changing the background colour use <body bgcolor="FFFF00"> This changes the background colour to yellow.
15th Jul 2016, 7:13 PM
Sairam
Sairam - avatar
+ 1
If you don't want to use CSS add an style attribute in the opening tag Exp <p style="color:orange;"></p>
16th Jul 2016, 7:05 PM
Eragon Dragoneel
Eragon Dragoneel - avatar
0
@rushika I don't think font tag is supported in HTML 5 :/
15th Jul 2016, 4:13 PM
Deepak Sharma
Deepak Sharma - avatar
- 1
In the body you should give the tags fontcolor="colorname"
15th Jul 2016, 3:25 PM
Rushika Bokde