HTML Page Structure

HTML Elements
HTML Attributes

HTML Span Tag

HTML Span tag is used to apply some effect like change of text color on a small part of your document. <span> tag provides a way to add an effect to a part of a text or document. <span> is used to apply style to inline elements.

The main difference between the div tag and the span tag is that div is used with block-level elements whereas span is used with inline elements.


<span style="color:#FFFFFF;">

Span Tag Example

<!DOCTYPE html>
<title>Span Example</title>
<span style="color:#FF00FF;">
Welcome to TechStrikers!</span>
Welcome to TechStrikers!

This will produce following result

Welcome to TechStrikers! Welcome to TechStrikers!