HTML span tag || span tag in HTML

HTML span <span> tag


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>


<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>.


Result - HTML span tag

Best WordPress Hosting


Discount Coupons

Get a .COM for just $6.98

Secure Domain for a Mini Price

Leave a Reply

    Waiting for your comments