No, there is not. However, <head> content will automatically be move to the head section of the output (which precedes the body).
Can you help me understand why you want something at the beginning of the body?
It works in the head, but the code duplicates the content in the body and there are two close tags for </head>
in line 14:
and in line 43
The same with the rest of the code in the HTML appended.
It's for a finder. You can see an example here:
This is the new code with the duplication. As you can see it generates a double </head>