What Is the HTML 5 span Tag?

The HTML 5 span tag defines a group of inline items in a page.

When Do You Use the span Tag in HTML 5?

The span tag, used by itself, doesn’t change anything at all. However, it can be useful to change some items (text, images, etc) within a larger group, and then apply CSS to the span. All will be made clear in the example below. You could also use JavaScript to make changes to that span.

How Is the span Tag Used in HTML 5 Documents?

Here is an example that you might use to apply a special “Drop Cap” effect to the beginning of a paragraph using CSS.


<p><span class="dropcap">In the beginning</span> was the Word, and the Word was with God, and the Word was God.</p>
<cite>John 1:1, NKJV</cite>

This entry was posted in HTML 5. Bookmark the permalink.

Comments are closed.