| Home / Technology / Web_development / Html | |
![]() |
<SPAN> and <DIV>DIV and SPAN are both tags used to set the properties for a particular piece of text. They are most often used as part of CSS to set style properties. Each works a little differently, however, and it is important to understand the difference.
<span>
Example:
<div>
<div>
This paragraph is in a div.
Restricted accessNotice how the color goes all across the page instead of being only where the text is. </div> |