Just change the extension to .phpinstead .html. Then you can simply put, for example, your whole head into a file head.php(or head.inc).
All this would look like this:
<!DOCTYPE html>
<?php
include 'head.php';
?>
<body>
</body>
<html>
You can divide your body into separate parts as follows:
<body>
<?php
include 'firstPart.php';
?>
</body>