How span tag is used in HTML?

Query By: SUMESH DAS

M

Mohit Verma

How span tag is used in HTML?

The <span> element is used in combination with CSS to apply styling or to target specific sections of text for JavaScript interactions. Here are some syntax examples for more understanding, of how it is used in HTML, such as:


Examples of <span> Used in HTML

  • <span>Inline content goes here</span>
  • <p>This is a <span style="color: red;">RED</span> text.</p>
  • <p>This is a <span id="highlight">HIGHLIGHTED</span> text.</p>
  • <p>This is a <span aria-hidden="true">HIDDEN</span> text for screen readers.</p>

1 votes

Your Answer

Email Us: advertise@gdatamart.com

Donate Us: Support to GDATAMART

LifeStyle & Fun

© 2024 GDATAMART.COM (All Rights Reserved)