0
How to make each letter different color in a word
which attribute is used to do it in css
4 Answers
+ 6
not about "right attribute"
but rather about right approach to the task at hand
wrapping each letter with an individual <div> would allow you to directly apply different CSS rules to each one
https://code.sololearn.com/W8Lx7hV5DJ69/?ref=app
+ 3
https://code.sololearn.com/WdmxI2uokr46/?ref=app
https://code.sololearn.com/WwgD3sHiuhxy/?ref=app
+ 2
Keep the tags together like this ( try it) :
<html>
<body>
<h2><span style="color:blue">P</span><span style="color:green">a</span><span style="color:yellow">g</span><span style="color:red">e</span>
</body>
</html>
0
very big code