The following uses a case to illustrate the differences between the span tag and the DIV Tag: by default, the range of the span tag is all characters in the span tag, and if it is a div tag, it is a line of its label. It is not difficult to understand the case.
<HTML>
<Head>
<Title> Differences Between span and Div </title>
</Head>
<Body>
<! -- The background color displayed for statements within the span range is limited to the length of the word. -->
<Span style = "text-indent: 1em; Background: yellow; font-family: Courier">
I am like a boat, looking for a harbor, cannot forget you </span>
<! -- The DIV range is the whole line. It does not end the background color because of the word length, but displays the whole line. -->
<Div style = "text-indent: 2em; Background: yellow; font-family: Courier">
I am like a boat, looking for a harbor, cannot forget you </div>
</Body>
</Html>
Span and Div are both layers. I still remember a friend gave an example to illustrate the differences between them:
[HTML]
<Span> AAAA </span> <span> BBBB </span>
<Div> AAAA </div> <div> BBBB </div>
[/Html]
In the above example, the span does not wrap, while the DIV does.