kb/data/developer.mozilla.org/en-US/docs/Glossary/Replaced_elements-0.md

12 KiB

title chunk source category tags date_saved instance
Replaced elements - Glossary | MDN 1/3 https://developer.mozilla.org/en-US/docs/Glossary/Replaced_elements reference web, html, css, javascript, documentation 2026-05-05T05:42:41.580983+00:00 kb-cron

MDN HTML HTML: Markup language

HTML reference

HTML guides

Markup languages

CSS CSS: Styling language

CSS reference

CSS guides

Layout cookbook

JavaScriptJS JavaScript: Scripting language

JS reference

JS guides

Web APIs Web APIs: Programming interfaces

Web API reference

Web API guides

All All web technology

Technologies

Topics

Learn Learn web development

Frontend developer course

Learn HTML

Learn CSS

Learn JavaScript

Tools Discover our tools

About Get to know MDN better

Blog

  1. Glossary
  2. Replaced elements

Replaced elements

In web development, replaced elements are HTML elements whose content are replaced by external resources or content defined outside of the document structure, and are not considered in the CSS rendering model. They are external objects whose representation is independent of the CSS formatting model. The following can be replaced elements:

The following are treated as replaced elements only in specific cases:

Replaced elements often have an intrinsic dimensions and intrinsic ratio. For example, the content of an <img> element is generally replaced by the image defined by its src attribute. That image has an intrinsic width and an intrinsic height specified in absolute units, which determines the aspect ratio. Form controls are generally non-replaced widgets , except for <input type="image">, which is replaced with an image. Objects inserted using the CSS content property are anonymous replaced elements. They are "anonymous" because they don't exist in the HTML markup.

In this article

See also