One special case involves non-replaced inline elements, as opposed to a replaced element.
Defined Replaced Element
In the realm of CSS, a replaced element stands apart as an entity whose appearance is not governed by CSS rules. These are external entities that maintain their own visual representation independently of CSS directives. Common replaced elements include <img>
, <object>
, <video>
, as well as form elements such as <textarea>
and <input>
. Certain elements like <audio>
or <canvas>
may only be considered replaced elements in specific contexts. Elements introduced using CSS content properties are known as anonymous replaced elements.
CSS treats replaced elements differently in various scenarios, particularly when determining margins and handling certain auto values.
It's important to note that while some replaced elements have intrinsic dimensions or a specified baseline, this feature is not universal and varies depending on the element, impacting CSS properties like vertical-align.
For more information, visit: MDN - Replaced element