Hi All
Here is the way to write the PHP logic in HTML File(i.e .html file).
In two ways we can achieve this.
1.change the setting in apache configuration file(i.e httpd.conf)
AddType application/x-httpd-php .php ---> AddType application/x-httpd-php .php .html
2. If you don't have the access to httpd.conf you can write .htacees file as
AddType application/x-httpd-php .php .htm .html
and then restart the apache webserver.