Highlighting text in html using different color background by span tag We can mark any area of a text in different color background. This way we can highlight some portion of the text. We will be using span tag in html to give color background to the text.