Difference between SPAN and DIV tags

We know that SPAN is for inline elements and DIV is for block level elements, so what is the effect on a block of text formatted with either...
Date Created: 25th September 2006
Date Modified: 25th September 2006
Home > PHP > menu/submenu function

WebmasterWorld CSS Forum:
http://www.webmasterworld.com/css/3094451.htm

.paragraph {
  padding:0;
  padding-left:50px;
  background-color:#ccc;
}

Styling a SPAN:

Since the SPAN is an inline element, the line box is simply spanning several lines, so only the first line is indented.

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Integer tincidunt. Pellentesque bibendum tristique nisi. Phasellus consequat adipiscing eros. Nullam sem augue, cursus a, placerat ut, vehicula at, neque. Duis tincidunt elit pellentesque nisi. Proin massa felis, suscipit et, posuere in, aliquet ut, risus. Fusce faucibus. Duis ut libero. Aenean at sem egestas neque semper porttitor. Cras posuere congue pede. Etiam odio est, facilisis quis, sagittis ut, faucibus ut, neque.

Styling a DIV:

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Integer tincidunt. Pellentesque bibendum tristique nisi. Phasellus consequat adipiscing eros. Nullam sem augue, cursus a, placerat ut, vehicula at, neque. Duis tincidunt elit pellentesque nisi. Proin massa felis, suscipit et, posuere in, aliquet ut, risus. Fusce faucibus. Duis ut libero. Aenean at sem egestas neque semper porttitor. Cras posuere congue pede. Etiam odio est, facilisis quis, sagittis ut, faucibus ut, neque.

[Home]