Template Tag Permitted Parents

Hi, I have a question on your template tag documentation. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/template

The docs specify that there are permitted parents. It makes sense, and I think it implies a parent as an ancestor rather than a direct parent - but even so, I can place a <template> directly in an <html> tag (with no <body> or <head> as a parent) and it works just fine. I’ve tried to find any other documentation that discusses restrictions on where a template can be placed, and I’m coming up with nothing. I wouldn’t be so exacting, except I’m writing a book which talks about the tag a little bit and I want to know if I’m missing anything.

Any context where I’m wrong, or historical notes about how this used to be right but not anymore would be much appreciated.

thanks!

@benforreal -

I think you’re right. I think either the information is outdated or was entered incorrectly. This will need to be reviewed.

The current text has been as it is for years now, so it’s entirely possible it’s based on an ancient version of the spec. Regardless, it’s disconcerting that we haven’t updated it since then.

I’ve filed a ticket on the docs to have this looked into.

1 Like

That’s great! Thanks much for opening this issue