Google News
logo
HTML - Interview Questions
What is the use of a span tag? Explain with example.
The span tag is used for following things:
 
For adding color on text
To add background on text
Highlight any color text

Example:
<span style="color:#ff00da;">
  This is sample testing text
</span>
 
Advertisement