If you really want to use PHP code in .html files, you can do this.
Your web server is configured to detect the file type by looking at the extension. By default, it will route .php files through the PHP interpreter, and .html files will be transferred directly to the end user. You can configure this behavior through the server configuration file or the local .htaccess file for a separate web directory. See @ kjy112's answer for how to do this.
The question is why? Is it important for you to do this, or is it just what you want, like subtlety. Ask yourself: will your end user help? or even notice?
The reason the browser is configured this way by default is because simple HTML files that don't have any PHP code can be provided to the user without having to do the overhead of processing by the PHP interpreter. By changing the configuration, all your HTML files will be interpreted as PHP, even if they actually do not contain PHP code, so you will add extra load to your server. Of course, if all your files have some element of PHP code, you will still want this behavior, so this obviously will not bother you.
So it can be done. But for you, there may be a better solution:
The current trend of SEO (search engine optimization) is to completely get rid of file extensions in URLs. If you look at the URL of this question, you will see that it has a very descriptive URL and without extension. If you want to keep track of current trends in best practice, you might consider lowering this route instead.
This is done using mod_rewrite . The descriptive part of the URL is completely arbitrary: if you change it, the page will still load correctly. The important part is the identification number before the description; the description is just there to give the page a google ranking. A full discussion of the technologies involved is beyond the scope of this question, but there are many resources that will help you (try finding mod_rewrite right here on this site to get started).
Note. All of the specific server configuration recommendations listed here apply to the Apache web server. If you use IIS or any other server product, you may need to adapt it accordingly.