The different between .html and .php is that:
index.php can read and recognize html elements and tags + the php syntax,
while index.html can NOT read and recognize the php syntax. that means any php code inside index.html won't work.
For example we have that code:
PHP:
<?php
echo "Hello from PHP";
?>
<br>
<h1>Hello from HTML<h1/>
If we put it inside index.php , it will print:
Hello from PHP
Hello from HTML
but if we put it in index.html , it will print:
Hello from HTML
Conclusion:
Any php code inside index.html won't work
Solution:
You can use API backend and use javaScript to communicate with the php backend through the HTML page.