Text Content
HTML <span> element
Provides a generic phrasing-content container with no inherent semantics. Use a semantic inline element when one matches the content. A span can mark part of a sentence for CSS, language or scripting. It has no default semantic role beyond grouping; use a more specific inline element when one exists. It accepts global HTML attributes; individual global features may be inapplicable or restricted.
Formal Syntax & Structure
html syntaxhtml
<span>Text</span>Return Value
HTMLSpanElement
Content model: Phrasing content, with element-specific restrictions.
Working Example
Example Snippethtml
<!doctype html><html lang="en"> <head> <meta charset="utf-8"> <title>HTML example</title> </head> <body> <p> Order <span class="status">ready</span> . </p> </body></html>