HTML <span> Tag


The <span> tag is a small box within a line of text or a document that helps highlight a specific portion.

The <span> tag can be styled with CSS or controlled with JavaScript using the class or id attribute.

The <span> tag works similarly to the <div> element. However, while <div> is a block-level element, <span> is an inline element.