posted 20 years ago
There is technically no difference between the two in terms of scripting them by the means of JavaScript. If, however, you compare them in terms of how they render in the browser and the default CSS in which is applied to them, that's a different story. The <div> element is a block-level element meaning it sits on its own line; the <span> element, however, is an inline-level element meaning it doesn't sit on its own line and can sit next to other fellow inline-level elements.
So, to sum things up: there is only a difference in how they render. When accessing them via JavaScript, there really is no difference.
[ March 14, 2004: Message edited by: Fred Vaughn ]