There _is_ a <template> element[0] for this purpose, but so far it falls short on being able to inject parameters like that, and is essentially useless if you don't have Javascript.[1]
I got the impression that the people defining the web standards just gave-up on letting things work without javascript.
If you don't want to import things like a frontend framework and HTMX parser, the templates are incredibly useful. They are also very useful for the backend to pass structure over to the frontend, as they are plain HTML. What they do not do is helping with the things that a static site generator will do.
<template tag="user-avatar" parameters="[src,alt]"> <img src="{src}" alt="{alt}"/> </template