Search code examples
htmlcsscolorsattributesparagraph

Is there something like ":" I am supposed to feature when coloring a word? (HTML)


I am making a paragraph about fruit investments. To make it experienced, I am coloring fruit words depending on their color:

<h1> Cantaloupes </h1><br>
<p> Cantaloupes is this type of melon that can be used as a fruit, like for drinking a refresher! 
They are used to make juice. It's this avocado looking fruit that has the outside as a different color.

And so on. I want to make a <script> attribute with <style> inside, so I can color the how so numbers of "cantaloupe" in the passage. How can I use <style> inside this, and if I cannot, how can I use <style> to paint the "cantaloupe" words?


Solution

  • <p>
    <span style="color: yellow">Cantaloupes</span> is a type of <span style="color: green">melon</span> that can be used... 
    </p>