There's absolutely no need to include a BOM in an HTML file. (If it really includes different encodings, then a UTF-8 BOM would be broken, so it sounds like you're a bit confused.)
If you expect the file to be saved to disk and used in places where UTF-8 isn't expected, you could add a meta element to indicate the encoding as well:
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
If in fact you are using a different encoding than UTF-8, then rather than a BOM, just change the value in the meta attribute.
If you really must have a BOM in there then you'll need to make sure that it's first thing you output, e.g.
echo "\xEF\xBB\xBF";
See How can I output a UTF-8 CSV in PHP that Excel will read properly? for an example where that actually makes sense.