In CSS, a replaced element is an element whose representation is outside the scope of CSS. These are a type of external object whose representation is independent of the CSS. Typical replaced elements are
<video> or form elements like
<input>. Some elements, like
<canvas> are replaced elements only in specific cases. Objects inserted using the CSS
content properties are anonymous replaced elements.
CSS handles replaced elements specifically in some cases, like when calculating margins and some
Note that some replaced elements, but not all, have intrinsic dimensions or a defined baseline, which is used by some CSS properties like
- CSS Key Concepts: CSS syntax, at-rule, comments, specificity and inheritance, the box, layout modes and visual formatting models, and margin collapsing, or the initial, computed, resolved, specified, used, and actual values. Definitions of value syntax, shorthand properties and replaced elements.
© 2016 Mozilla Contributors
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.