After <div> element, <span> element is most loved inline element. It could be used anywhere in a text, and we can use INLINE CSS STYLE, CLASS or ID with it.
Example of INLINE CSS STYLE:<p>This is <span style="color:orange">orange color.</span></p>
Example of using using CLASS:<p>This is <span class="orange">orange color.</span></p>
Example of using ID:
<p>This is <span id="orange">orange color.</span></p>
But better use CLASS with SPAN element, rather than using ID; 'coz same ID shouldn't be used more than one element, whereas a CLASS could be used for more than one element.
Comments
Post a Comment