Top level, block level, inline, three categories of HTML elements if you subdivide these elements, you can classify them separately as
Top(top-level) element,
Block-level(Block-level) Elements and
Inline(inline) element.
1.
top-level element"Top-level element": {HTML, body, frameset}
including HTML, body, frameset, performance such as block-level element, belonging to the advanced block-level elements.
2.
block-level Element"Block-level element": {p, H1~h6, Div, ul}
As the name implies is a block display elements, height width can be set. For example, we commonly used P, H1~h6, DIV, ul default state is a block-level element. Block-level elements are more overbearing, the default state occupies an entire line each time, the following content must be a new line to display. Of course, non-block-level elements can also be display:block through CSS, changing them to block-level elements. In addition, there is a special, float also has this function.
Block-level elements can exist independently, separating the general block-level elements with a newline (such as a line after a paragraph ends). Block-level elements are the primary and key elements that make up an HTML, and any block-level element can be interpreted with the box model.
3.
Inline ElementInline element: {A, BR, EM, IMG, Li, span}
Popular point is the way the text is displayed, in contrast to block-level elements, the height of the inline element width is not set, its width is its own text or the width of the picture. We are used to, and
all belong to inline elements. Inline elements are displayed as text-like displays and do not occupy a single line alone. Of course, inline elements can also become block-level elements, that is, through the display:inline of CSS, and float to achieve.
Inline elements are attached to other block-level elements, and are displayed immediately between the associated elements, without wrapping.
As defined in the CSS authoritative guide, " any visible element that is not a block-level element is an inline element." the characteristic of its performance is the "Row layout" form. "I'm personally not used to the line layout, because I think block-level elements behave more like" rows ", while inline elements are more like" text "Display properties. It is important to remember that the height width of an inline element is not set, and its width is the width of its own text or image. Since you set the width of the height of half a day after no response to discover, originally this is only an inline element.
Original: http://blog.sina.com.cn/s/blog_77a4568a0101d63m.html
HTML you should know the three basic elements