Can I set the HTML DOCTYPE element by a CSS stylesheet? I am trying to convert a 3rd party application where I do not have access to the raw HTML files and need to set the DOCTYPE.
No, not with CSS, and probably not reliably even with JS. It can be accesed in some browsers but I don't think it can be changed.
What is the 3rd party app written in?
Why is it that you need to change the doctype? You may be able to accomplish what you want without changing it.