What's the difference between innerHMTL and outerHTML ?

  • Thread starter gimme_this_gimme_that
  • Start date
R

RobG


You should not assume that the subject of your post is visible when
the content is read.

Both innerHTML and outerHTML are proprietary properties introduced by
IE. innerHTML is a property of a DOM element that represents the HTML
inside the element, i.e. between the opening and closing tags. It has
been widely copied, however implementations vary (probably because it
has no published standard[1]) particularly in how they treat element
attributes.

outerHTML is similar to innerHTML, it is an element property that
includes the opening an closing tags as well as the content. It
hasn't been as widely copied as innerHTML so it remains more-or-less
IE only.


1. That is not to say that a published standard would remove all
variances, but it would likely reduce them.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top