In HTML tags can only be in the or the , but the must be direct children.
You should check out the head-support extension. With this you will be able to include a tag in the html response and Htmx will check for elements to add to the actual page head.