Block elements:
It is generally the container element of other elements, can accommodate block elements and inline elements, which by default will not be the same line with other elements, that is, the equivalent of two blocks are written together vertically layout. The most common is div and P
Inline elements:
Inline element is also called inline element, it can only accommodate text and other inline elements, common inline elements have hyperlinks, a, span, img
The difference between the inline element and the block element is that the inline element does not start from the new line, and the horizontal direction is followed.
Each block element will start from the new line.
Emphasize: Display:block; Float:left/right; When a CSS defines one of these two properties for an inline element, the elements in these rows will have a block element attribute! For example, you start with a new line, just like a newline character followed, and have the height and width properties.
If you want to make a block element into an inner element, just add display:inline to the CSS.
The understanding of CSS block elements and inline elements (inline elements)