<span> html code example

Example 1: span html

The HTML <span> element is a generic inline container for
pieces of content, which does not inherently represent anything. 
It is mostly used for grouping and styling bits of content.
<span> is very much like a <div> element, but <div> is a 
block-level element whereas a <span> is an inline element.

Example 2: what is span in html

<!--
	Span is used to group inline elements.
	You can apply specific attributes to the span element
	that will only be applied to the content within.
	Below is a simple example -->
<p>Black text <span style="color:#ff0000">Red Text </span>Back to Black</p>

Example 3: html span

A <span> element used to color a part of a text:
  
<span style="font-size:30px">&#9776; </span> 
<!-- &#9776 is a color value -->

Example 4: javascript span style

//an example of an "out of context" way to change color of a text:
<span style="color: green"></span>

Example 5: how to write

<span></span>