According to a [comment](https://github.com/geany/geany/issues/1899#issuecomment-465095249) at #1899:
Note that Geany does in fact detect the prefixes you suggested:
<!DOCTYPE html <html <?xml <?php
and a whole bunch of #! names.
However, when I tested each of the prefixes mentioned above in a file named `test`, the assigned filetype is "None".
Since filetype autodetection occurs only when documents are opened, I closed and reopened the document after changing the first line prefix.