Menu
Riverview Church

INSERTADJACENTHTML

insertAdjacentHTML parses the given string text as HTML or XML and inserts the resulting nodes into the tree in the position given by the position argument.

SYNTAX

element.insertAdjacentHTML(position, text)
beforebegin

Before the element itself.

afterbegin

Just inside the element, before its first child.

beforeend

Just inside the element, after its last child.

afterend

After the element itself.

EXAMPLES

BEFOREBEGIN

AFTERBEGIN

BEFOREEND

AFTEREND

INTERNAL

innerHTML

outerHTML

EXTERNAL

World Wide Web Consortium (W3C)