div and span...

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • RAB

    div and span...

    What is the difference between a <divand a <span>? When is it best
    to use each?

    Thanks,
    RABMissouri2007

  • Harlan Messinger

    #2
    Re: div and span...

    RAB wrote:
    What is the difference between a <divand a <span>? When is it best
    to use each?
    DIV delimits a logical subdivision of your document. SPAN delimits a
    sequence of inline content. Almost anything can be inside a DIV. SPANs
    are normally contained inside a P, and H?, a LABEL, or other element
    that doesn't contain block elements, and can only contain inline text
    and inline elements such as <EM>.

    Comment

    Working...