Read Time: 1 min
<span> element is an inline element, which doesn’t really describe its content in any specific way. Because of this, it should only be used when there isn’t a more appropriate semantic element available.
You might use it for styling content (directly, or with the
id attributes for example) or for grouping content for some other reason.
A <span>book</span> can take you around the world and back, all you have to do is <span>open it</span>.
<span> element is supported in all modern browsers. Read more on caniuse.com.
<span> tag supports Global Attributes in HTML. Global Attributes are common to all HTML elements and can be used on all of them (though they may not have much of an effect on some of them).
Related HTML Elements
<span>element is similar to the
<div>element, in that they’re both generic and don’t describe their content. However,
<div>is a block level element.
Did you know?
<span>was introduced to HTML by the Internationalization Working Group on September 25, 1995.
Want a weekly email summary?
Subscribe below and we’ll send you a weekly email summary of all new Web Design tutorials. Never miss out on learning about the next big thing.Sign up
St. Louis, Missouri
I write, teach, and love learning all things web. While I specialize in product design I’m a man of many hats who has worked with mom and pop shops to fortune 500 corporations.
Looking for something to help kick start your next project?
Envato Market has a range of items for sale to help get you started.