I’m I am completely unable to see the use or the benefit of the <span>
element. I understand the theory that it’s supposed to isolate elements that are inline with other elements, (if I’ve got that right?) but I just don’t see how it does that. I included the opening and closing tag between random words within a sentence and I saw no difference in the outcome. What has it done that I’m unable to see?
lets say we have a paragraph:
<p>i am red</p>
and we only want to give the word red a red color we can use span:
<p>i am <span style="color: red">red</span></p>
see? Quite useful.
5 Likes
Ok, I see. This makes sense, thank you!
So <span>
Is like an escape char, in case we want to work with only that word or sentence or group of words. Nice