New course! Every coder should learn Generative AI!
Try a free lesson+ 11
How do you create multicolored text in a webpage?
6 Answers
+ 10
yes it correct @mallesh
+ 9
or any other ways ?
+ 9
is it correct ? @shehab soliman
+ 8
This is example color:
<p span style="red">your text</p>
+ 6
you could separate your text in single letters and then put each in the <span> tag after that just give those spans classes ir id's and the give everyone different colors
+ 4
@Mallesh Techie wrote: "is it correct ? @shehab soliman"
... after @SHEHAB SOLIMAN wrote: "<p span style="red">your text</p>"
No, it isn't... you must at least write: '<span style="color:red;">'
The only "other way" is to preformat your text with a script tool ( usually JS, but you can handle text with whatever programming/scripting language you want ) for simplify your task of putting one <span> element by letter ;)