HTML <span> Tag
The <span> tag is a generic inline container with no semantic meaning. Use it to wrap text or inline content for styling (CSS) or scripting (JS). It does not change the meaning of the content. Prefer semantic elements (<strong>, <em>, <code>, <mark>) when they fit.
span vs div
<span> is inline: it flows with the text and does not start a new line. <div> is block: it starts on a new line. Use span inside paragraphs or other inline contexts; use div for block-level grouping.
Best practices
Use <span> only when no semantic element applies. For emphasis use <em>; for importance use <strong>; for code use <code>. Add class or style on span for CSS when you need to style part of text without semantic meaning.
