HTML <span> tag is an inline container used to group elements for styling purposes (using CSS) or for scripting with JavaScript. Unlike block-level elements such as <div>, the <span> element does not create a new line in the layout; it's inline, meaning it doesn't disrupt the flow of text.
HTML Span Tag Styling Text
<p>Sakala code <span style="color:green">HTML </span><code><span></code> tag.</p>
HTML <span> Tag syntax
<span>...</span>
HTML Span Tag with example
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Span Example</title>
<style>
.highlight {
color: red;
font-weight: bold;
}
</style>
</head>
<body>
<p>Sakala code <span class="highlight">HTML </span><code><span></code> tag.</p>
</body>
</html>