Is there a way to make files like navbar.html and then using JavaScript to use files like these as components? For example, Let's say I have a file called imageCarousel.html and I have to use this file in many different HTML files so how can I make a JavaScript file that has a function that takes in the class of where I want to display the HTML file's code, and then the path of the HTML file and then also how can I use that JavaScript file in other JavaScript files?
I have searched many different places and I can clearly state that there is no other place for this exact question. And I am asking this question after doing all the research.
Also I don't want to use any library here like react etc.
Thanks for reading this query!
ejsor handlebars or any other template engine. You can also use React :)