HTML span Tag
Well, this tag is similar to the div tag (Which we are going to see ahead), with the difference that the div tag is a block element, and the span is an inline element.
Here is the code for using the span tag →
<meta http-equiv=”X-UA-Compatible” content=”IE=edge”>
<meta name=”viewport” content=”width=device-width, initial-scale=1.0″>
<span>Hello… i am a span</span>
<span>Hello… I am another span</span>
If we try to open the file in the browser, the output is something like this –
As you can see, the content is now side by side. The reason is that the span element is an inline element, which means that it takes up the space it requires and leaves the other space. Unlike this, the block elements add a line break, so that the next content comes to the new line. We are going to see the div tag soon, through which, you will get an idea of the block element. Remember that the span is an inline element.