Unfortunately, that link leads to a page filled with misinformation and
utter nonsense!
Here's the truth.
<div> and <span> are BOTH containers. They are NOT XHTML tags. They were
NOT added to HTML late in the game. They can BOTH be styled.
<div> is a block level tag. This means that it can contain multiple lines
of code.
<span> is an inline tag. This means that it *should* contain only a single
line of code. People use it for multiple lines incorrectly. There are no
code police that arrest them, however.
Both of these tags can be EXTREMELY useful in building your page when using
advanced layout methods (i.e., CSS positioning). Both of these tags can be
EXTREMELY useful in styling the content on your page.
Here's how you would use them (WARNING - CODE EXAMPLES FOLLOW!)-
<div style="margin-left:200px">All content within this 'container' will have
a left margin of 200px.
<img src="..."...>
<div style="..."></div>
<p>multiple lines of content here</p>
etc.
</div>
<p>The formula for water is H<span id="subscript">2</span>O</p>
(I am assuming you have a CSS style defined on that page that details what
"subscript" means)
Note that the former example's container (div) encloses all manner of page
elements, while the latter only encloses (or contains) text, and only text
that appears on a single line.
This is more or less how these tags are used.
--
Murray
"Rob Giordano (aka: Crash Gordon®)" <
[email protected]>
wrote in message There's a good explanation of div & spans here:
http://webdesign.about.com/cs/htmltags/a/aa011000a.htm
| Okay I know this is dumb but is the main purpose for the Div statement?
| All over I have <div......> and </div>.
|
|