Reference: CSS Specification
Text directly contained inside a block container element (not within an inline element) is considered as an anonymous inline element.
For example, in an HTML document like this:
<p>Some <em>emphasized</em> text</p>
the
<p>
generates a block box with inline boxes inside it. The "emphasized" box is an inline box from the<em>
element, while "Some" and "text" are inline boxes from the block-level element<p>
. These latter boxes are known as anonymous inline boxes.
My question is simple - can margins, paddings, and borders be set by CSS on these anonymous inline boxes?
Take a look at the image below: https://i.sstatic.net/ZCrV5.png
We also have line boxes present. Are we able to apply the same margin, padding, and border styles to these line boxes as well?