If PHP script is not working in your HTML file then don’t worry, Here is a simple solution which can fix your problem without using php.ini files and sometimes php.ini does not change anything.
Paste this code in your .htaccess of your root folder like /home/username/public_html/.htaccess
AddHandler application/x-httpd-ea-php56 .htm .html .shtm
Change PHP version according to your needs, If you are using PHP v7 then change php56 to php70
Code for PHP version 7:
AddHandler application/x-httpd-ea-php70 .htm .html .shtm
Code for PHP 5.4
html files does not display php code – cPanel