Highlighting text in html using different color background by span tagWe 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. Note that we are not using bold tag here to highlight the font in bold letters.
With Div tagSpan tag is also used along with div tag for generating power full CSS effects. We will try how we can format a particular area of text by using span tag and style sheet.
Before that let us start with an simple example. Using span tag we can mark different areas in different colors. Here is the code for a simple span tag.
Welcome to plus2net html section. Use the forum to post any query / doubts on the tutorial
Here is the code
Welcome to <span style="background-color: #FFFF00">plus2net html</span> section.