<?xml version="1.0" encoding="utf-8"?>

The container tag <span>

The container tag <span>

The <span> element is similar to the <div> element — both are used to separate a part of the text to which you want to apply different styles. The <span> element has no required attributes, but style, class, and id are common. This element's only difference from the <div> element is that it's an inline element — it doesn't force a line break and only takes up as much width as necessary.

Improve your UX & Product skills with interactive courses that actually work