you can add php script at any where in html just adding php tags <h1>Heading</h1> <?php ..script... ?> <p>this is para</p>
If the file is named something.html, it won;'t run PHP code. You'll have to rename it to something.php. Since this is a template, not an HTML file, you can't do it that way. Most templating systems don't allow PHP in the template, so you'd have to write a plugin for the system or redesign the program that's using the templating system in order to be able to put PHP in templates. And how to do that is really beyond the scope of this forum.
If you don't change your document's file name from "index.html" into "index.php" your script will not work. So don't forget it.
There is an option, though. You can configure your .htaccess file so that it will ask the computer to process/parse html files as php files, if necessary. A search online will help you find how.
Some of the tips on this old page should help you: http://forums.digitalpoint.com/showthread.php?t=7584