The Best Way to Create HTML Elements with JavaScript? In today's video I'll be showing you my favourite way to generate HTML elements using JavaScript.

This technique allows you to pass in an HTML string and receive an HTML element back, meaning you then have access to things such as class list, event listeners, text content etc.

For your reference, check this out:
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/template 

👋 Subscribe: https://www.youtube.com/@dcode-software/featured 

#html

How to Generate HTML elements using JavaScript
7.85 GEEK