.one{color:red}
.two{color:blue}
.three{color:yellow}
.four{color:green}
<html>
<span class="one">1</span>
<span class="two">2</span>
<span class="three">3</span>
<span class="four">4</span>
<span class="two">2</span>
<span class="two">2</span>
<span class="one">1</span>
<span class="four">4</span>
<span class="three">3</span>
<span class="three">3</span>
<span class="two">2</span>
<span class="one">1</span>
</html>
I want to display a bunch of text with different colors, here I take number for example. Is there a simple way to highlight different text based on their content, like code editor? Here I have to hard code the css color class.