In many places I have put elmeents nested in other elements. I can\'t deduce when a child element causes the parent element to expand. I don\'t have any code to post as th
Get firebug for firefox. You can browse the DOM (the HTML structure of the page) and it will highlight elements according to how the "browser's eye" sees them (versus how they look aesthetically).
A few general rules of thumb:
The first thing that you should understand is the CSS Box Model. That will help you understand how properties of an element cause it to have the size and dimensions that it has. Another good resource is here.
To answer your main question in the most simple manner (and being very general):
div
, p
, and ul
are all block. span
, em
, strong
are all inline. There are many ways to tweak the display of elements with CSS.