Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Formatting context is a concept in CSS that describes the way in which boxes are laid out within a container. Inline-level boxes are boxes that are contained within a line of text, such as individual words or characters. These boxes cannot be broken down further because they represent the smallest units of text that can be styled individually.

When it comes to formatting context, inline-level boxes are affected by their parent container, which may be a block-level or inline-level element. For example, if a parent element has a certain width, this will affect the width of any inline-level boxes contained within it. Similarly, if a parent element has a certain line-height or text-align value, this will affect the way in which inline-level boxes are displayed within the text.

Overall, the formatting context of a document affects the layout, positioning, and styling of all boxes, including inline-level boxes. Inline-level boxes may be affected by their parent container, but they cannot be broken down further because they represent the smallest unit of text that can be styled individually.