In-line elements (inline element), also called inline elements;
Inline elements can hold text or other inline elements, and common inline elements include <span>, <a>, <input>.
Block element:
Block elements are generally started from new rows, and can hold text, other inline elements, and other block elements.
Even if the content is not a row, block elements to fill the entire row, and will be wrapped to show that the common block elements are <div>, <p>.
Some CSS properties may not take effect on inline elements, which is related to the browser's version and type, so use block element positioning whenever possible.
Cases:
<TITLE>CSS block elements and inline elements </title>
<body>
<div style= "Background-color:gray" ><span style= "Background-color:pink" >www.bianceng.cn</span> </div>
</body>
You can see the effect, in this case, the block element (<div> Element) fills the entire row, and the inline element only takes up the width of its content and does not occupy the entire row.
The effect of the following figure:
More Wonderful content: http://www.bianceng.cnhttp://www.bianceng.cn/web/Css/