You (presumably) aren't delivering PHP to the client, but are running it on the server to generate some output. Since it isn't being send to the client, you shouldn't tell the client anything about it.
The remaining content can't be simply "HTML + CSS + JS". You probably have HTML with embedded CSS and JS. This is an HTML document. The types of the embedded content are described by the HTML.
Use a text/html
content type (which you don't have to specify because PHP defaults to outputting one if you don't say otherwise).
there's no body tag
So you are outputting a fragment of HTML and not a complete HTML document? As far as I know, there is no standard MIME type for that.
the problem is, the javascript is not being recognized
This almost certainly has more to do with how you are manipulating the original document (presumably using innerHTML
(assigning content that includes JavaScript to innerHTML results in the JS being ignored)) then with the way you are delivering the data to the browser.