Styling Span in CSS
The <span> Tag
-
The <span> element has very similar properties to the <div> element, in that it changes the style of the text it encloses.
-
But it does not has any style of it’s own, rather we have to apply styles to it.
The <span> Tag Syntax
some text <span> some text</span> some text
The Difference
- The primary difference between tne <span> and <div> element is that snap doesn't do any formatting of it's own. The <div> element includes a paragraph break.
-
The <span>element simply tells the browser to apply the style rules to whatever is within the <span>.
- Another difference is that <span> is an inline element and <div> is a block level element