MDN self-hosted library · e01.org

HTMLElement: outerText property

Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.

html
<div>
  <p>Original content</p>
</div>
html
<div>Whole element replaced</div>
html
<div>
  <p>Content inside element replaced</p>
</div>