Inject HTML From a String of HTML

PHOTO EMBED

Fri Apr 24 2020 11:14:39 GMT+0000 (Coordinated Universal Time)

Saved by @Dimples #javascript #javascript #string #html

  document.body.innerHTML = string_of_html;

// Append it instead
document.body.innerHTML += string_of_html;

                                
content_copyCOPY

You can use innerHTML to put that element, like above.

https://css-tricks.com/snippets/javascript/inject-html-from-a-string-of-html/