Name
innerHTML — NN n/a IE 4 DOM n/a
Synopsis
Read/Write
The rendered text and HTML tags (i.e., all source code) between the
start and end tags of the current element. If you want only the
rendered text, see innerText. For the source code
that includes the element’s tags, see
outerHTML. A change to this property that includes
HTML tags is rendered through the HTML parser, as if the new value
were part of the original source code. You may change this property
only after the document has fully loaded. Changes to the
innerHTML property are not reflected in the source
code when you view the source in the browser. This property is not
supported in many objects in the Macintosh version of Internet
Explorer 4.
Example
document.all.elementID.innerHTML = "How <I>now</I> brown cow?"Value
String that may or may not include HTML tags.
Default
None.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access