Aren't these two tags the same?
Printable View
Aren't these two tags the same?
<span> is for spanning inline text and div is a replacement for the <p> tag.
Example:
Example:Code:This is <span style="color:red">spanning text</span>, see how this works?
Code:<div style="border:1px">This is is a paragraph of text.<br>
This works like the <p> except its can interact with javascript by using dhtml.</div>
This needs to be in the FAQ.
Span is inline, div is block. I wouldn't say that div is a replacement for p. The p block will wrap around floats. I think that is an inline box attribute.
'Course, you can redefine everything with the CSS.
I think CSS actually defines all tags as inline until that gets overidden by the UA's default style sheet.
Thanks!