HTML <span> tag
- closing tag
- required
- void element
- no
- lives inside
- inline, inside text
- typically holds
- a few words
Where it goes
Around a few words in the middle of a sentence, inside a <p>, an <li>, anywhere text lives. It never starts a new line.
Example
The price is <span class="price">$12</span> today.Open this example in the editor →
Common mistakes
- Using <span> around a whole paragraph or section. That is a job for <div>.
- Expecting it to change how the words look. It will not, until you add a class and style it.