I would suggest to arheive this consider using jQuery:
You can do this by using jQuery .load
function. You can read more about using .load here
There is no proper direct way to import your .html
or .php
files by adding them in to the head
Note: There are few libraries you can search by googling BUT remember most of them are Deprecated and will not work in CHROME and OTHER BROWSER like this one here
You can define the location of where your other HTML files divs
should be loaded like i have done below.
<html>
<head>
<script type='text/javascript' language='javascript' src='.path/to/script.js'>
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script>
$(function() {
$("#loadDivs").load("file.html");
});
</script>
</head>
<body>
<div id="loadDivs"></div>
</body>
</html>