Styling Div in CSS
The <div> Tag
-
The div tag is used to specify a section within an HTML document. Anything from text to images to videos can be placed within a div.
-
Divs are similar to paragraphs but they are easier to use, customizable with CSS, and load faster than tables.
The <div> Tag Syntax
<div>
<!- - other HTML tags and data - - >
</div>
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