Home >Web Front-end >JS Tutorial >The difference between innerHTML, outerHTML and innerTEXT_javascript skills
Unlike innerHTML, outerHTML includes the entire tag, not just the content inside the tag. For a div with the ID "testdiv", the differences between outerHTML, innerHTML and innerTEXT can be shown in the following figure: