HTML SPAN Tag || Span Tag in HTML

HTML SPAN <span> Tag

0 1153

HTML SPAN <span> tag is define a generic container of inline tag. It work like div but <div> tag groups block-level elements, whereas the <span> groups inline elements.

It is used for styling purposes to the grouped inline tag (using class and id attribute or inline style).

The SPAN <span> tag is used to:

  • Apply scripts to exact parts of the text, for example, highlight the syntax of the code, etc.
  • To change the language of a part of the text.
  • To Change the font of separate words or phrases.
  • To change the color, font, background of a part of text using CSS.
  • To apply the scripts exact parts of the text.


<span> content goes here.. </span>


<!DOCTYPE html>
<title>HTML Span Tag</title>
 <h2>Example of Span Tag</h2>
 <p>Codingtag is the E-learning
	<span style="color:red;">website covering all aspects of</span>,
	<span style="color:green;">technical tutorials</span>.



Best WordPress Hosting


Leave a Reply

    Waiting for your comments