• Skip to primary navigation
  • Skip to main content

Tech Honey

The #1 Website for Oracle PL/SQL, OA Framework and HTML

  • Home
  • HTML
    • Tags in HTML
    • HTML Attributes
  • OA Framework
    • Item in OAF
    • Regions in OAF
    • General OAF Topics
  • Oracle
    • statement
    • function
    • clause
    • plsql
    • sql

Span in html

HTML Span Tag

August 10, 2013 by techhoneyadmin

HTML Span TagHTML Span Tag <span> is used to group certain elements within an HTML resource or webpage.

HTML Span Tag <span> usage itself will not change the way in which the spanned part of HTML resource is rendered, but yes by using the span HTML Tag we can change the way an element appears in a browser.

Once an element or a portion of HTML resource is wrapped within the span HTML Tag, we can then style the element with CSS Properties or even Javascript.

HTML Span tag <span> is a closed tag and hence needs a closing HTML Span tag </span>.


Syntax of using HTML Span Tag

<span>
Some text Here …
</span>

Example of using HTML Span Tag

HTML Span Tag Code Output

 I have two cars.
One is <span style="&quot;color: red; font-weight: bold;"> RED </span>
and other is <span>GREEN
</span>.

I have two cars. One is RED and other is GREEN.

In the HTML Span Tag example above we can see that the output contains the text “RED” and “GREEN” in red and green colors respectively. What we have done here is that we have formatted the “RED” and “GREEN” text using the Span HTML Tag so that they appear bold and in red and green color.

HTML Span Tag Support all HTML Global Attributes and HTML Event Attributes.


HTML Span Tag Supporting Browsers

S. No. Browser Supported(Yes/No)
1 Internet Explorer Yes
2 Firefox Yes
3 Google Chrome Yes
4 Opera Yes
5 Safari Yes

Filed Under: Tags Tagged With: How to write span in html, How to write span tag in html, HTML Span, Html span class, Html span color, HTML span style, HTML Span Tag, HTML Span width, HTML tag Span, Html writing span tag, HTMLSpanTag, Span HTML, Span HTML Tag, Span in html, Span style html, Span Tag, Span tag HTML, Syntax and Example of Span html tag, Tag HTML Span, Tag span, Tag Span HTML, Use of html Span tag, Using html span tag, What is the use of html span tag

Copyright © 2025 · Parallax Pro on Genesis Framework · WordPress · Log in