- 1
<span>
Does anyone know what <span></span> does in HTML?
2 ответов
+ 4
Span tags are used in order to create an inline piece of text with different formatting. It is meant to be used within other elements as a way to add extra detail to something being displayed. For example, you might want to change the color of only one word within a line of text, and the span element is designed for this (because it keeps everything on the same line).
Here are some examples:
<p>Here is a sentence, but I want <span style="color: blue;">this</span> word to be blue.</p>
<p>I also would like a <span style="font-size: 50px;">big</span> word.</p>
+ 2
Thank you so much