Weather APP with Vanilla TypeScript (using Vite) and API from open-meteo
HTML Templates
This tag has content which is hidden during page load that can later be rendered using Javascript.
On JS end, we first clone the template using content.cloneNode function provided by TemplateElements which basically returns the HTMLElement(Node) contained inside element. We add the contents we want in this cloned element and append to our HTML. Refer