logoalt Hacker News

gugagore05/03/20252 repliesview on HN

I think the quickest way to say it is that there is only one head on a page, and every HTML file needs a head. So if you include one into the other, you either have two heads, or the inner document didn't have a head.


Replies

econ05/03/2025

They can just be html chunks. No need to make sense on their own.

Maybe a single tag that points at an url to load if someone attempts to load the chunk directly.

mattlondon05/03/2025

See DofumentFragment - sounds a lot like this: https://developer.mozilla.org/en-US/docs/Web/API/DocumentFra...