Sign up
Sign in
This also makes specifying the exact point where a new element should be inserted much easier. Say you want to insert an <a> right before this <p>. Without insertAdjacentHTML you would have to do this:
<a>
<p>
insertAdjacentHTML
Danny Moerkerke
Dr. Derek Austin 🥳
Follow
--
Share
Very cool! Thanks Danny!
Hi, I'm Doctor Derek! I've been a professional web developer since 2005, and I love writing about programming with JavaScript, TypeScript, React, Next.js & Git.
Help
Status
About
Careers
Press
Blog
Privacy
Terms
Text to speech
Teams