Visual formatting model of W3C

Block-level elements and block boxes

Block-level elementsare those elements of the source document that are formatted visually as blocks (e.g., paragraphs). The following values of the'display'property make an element block-level: 'block', 'list-item', and 'table'.

Block-level boxesare boxes that participate in ablock formatting context.Each block-level element generates aprincipal block-level boxthat contains descendant boxes and generated content and is also the box involved in any positioning scheme. Some block-level elements may generate additional boxes in addition to the principal box: 'list-item' elements. These additional boxes are placed with respect to the principal box.

Except for table boxes, which are described in a later chapter, and replaced elements, a block-level box is also a block container box. Ablock container boxeither contains only block-level boxes or establishes an inline formatting context and thus contains only inline-level boxes. Not all block container boxes are block-level boxes: non-replaced inline blocks and non-replaced table cells are block containers but not block-level boxes. Block-level boxes that are also block containers are calledblock boxes.

The three terms "block-level box," "block container box," and "block box" are sometimes abbreviated as "block" where unambiguous.

你可能感兴趣的:(Visual formatting model of W3C)