title: Is there a way to make every word different color in CSS?
body: <p>So I wanted to make every word in the text different color, but I've only find code to make every letter in the text a different color. Is there any way to turn this to change color in every word instead every letter?</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
         var message = "The quick brown fox.";
         var colors = new Array("#ff0000","#00ff00","#0000ff"); // red, green, blue
         for (var i = 0; i &lt; message.length; i++)
            document.write("&lt;span style=\"color:" + colors[(i % colors.length)] + ";\"&gt;" + message[i] + "&lt;/span&gt;");
      &lt;/script&gt;
  </code></pre>