O'Reilly logo
  • Ahmed Elgendy thinks this is interesting:

The innerHTML property represents all the content contained in your element, including other nested elements (like a paragraph might include <em> and <img> elements in addition to the text in the paragraph). In other words, it’s the HTML that’s “INside” your element. Is there an outerHTML property? Yes! And that property gets you all the HTML inside the element, as well as the element itself.


Cover of Head First JavaScript Programming


what are innerHTML and outerHTML?