0 points
Submitted by Nicholas Pryor
about 10 years

What does the span tag do?

Can you explain the span tag to me in a little more information?

Answer 502ad79ab78f680002029ca4

4 votes
Best answer


The span tag is like the div tag. It has no meaning at all and is mostly used for styling by using an id or class. The difference between the two is that div is a block element, It’s on a seperate line. span however is an inline element, meaning that it can be on a line with other elements.

Example: span

<span>I will display inline next to the b tag</span><b>I will display next to the span tag</b>


<div>I will display as a block element on my own line, above the b tag</div><b>I will display beneath the div tag</b>

You could style them using id’s or classes like this:


<span id="changeColor">I'm gonna change!</span>


#changeColor {

That’s about it. Hope this helped, just ask if you have more questions.

Submitted by Nico Ekkart
about 10 years


Nicholas Pryor about 10 years

Thank you so much. You had not only answer my question but also added alot of details I didn’t even ask for. Thank you once again.

Nico Ekkart about 10 years

You welcome