[thelist] DIV, SPAN
Jay Blanchard
jay.blanchard at niicommunications.com
Wed Apr 24 09:02:00 CDT 2002
[snip]
What is the difference between DIV and SPAN? I've always been using <DIV
CLASS=...> in my pages, but I've been noticing that <SPAN...> appears to be
doing the same thing. Does it?
[/snip]
>From http://www.w3.org/TR/html401/struct/global.html#edef-SPAN
The DIV and SPAN elements, in conjunction with the id and class attributes,
offer a generic mechanism for adding structure to documents. These elements
define content to be inline (SPAN) or block-level (DIV) but impose no other
presentational idioms on the content. Thus, authors may use these elements
in conjunction with style sheets, the lang attribute, etc., to tailor HTML
to their own needs and tastes.
SPAN is inline
DIV is block-level
HTH!
Jay
More information about the thelist
mailing list