About Lesson
Definition:
The <span>
element in HTML is an inline element used to group inline-elements in a document. It doesn’t add any specific meaning to the content but can be used with CSS or JavaScript to apply styles or functionality to specific parts of the text.
Syntax:
<span>..................content...............</span>
Example:
HTML
<!DOCTYPE html>
<html>
<body>
<span>
<h1>This is <span style="color:blue">heading 1<span></h1>
<h2>This is heading 2</h2>
<h3>This is heading 3</h3>
<h4>This is heading 4</h4>
<h5>This is heading 5</h5>
<h6>This is heading 6</h6>
</span>
</body>
</html>