A simple way to highlight text in color using HTML

Highlighting text can help bring important information immediately to the readers' attention, such as "Important!"

The following html code can be used to highlight text in a specific color:

  • Cyan: <span style="background-color:#00FEFE">Cyan Text</span>
  • Green: <span style="background-color:#00FF00">Green Text</span>
  • Yellow: <span style="background-color:yellow">Yellow Text</span>
  • Pink: <span style="background-color:#FF00FF">Pink Text</span>

The above html codes will highlight text in cyan, green, yellow and pink respectively.

  • Cyan: Cyan Text
  • Green: Green Text
  • Yellow: Yellow Text
  • Pink: Pink Text

You can change the color code as you wish. However, I recommend you minimize the use of highlights.

Leave a Comment