And it has to be you? you don’t say exactly why, but alternatively, you can do it with php and decent hosting or not at all, should offer you a server with php support, just create a file with extension '.php' and open the tag '<?php codigo aqui ?>
'. ai you can use include to lynch the file. Follow: https://www.php.net/manual/en/function.include.php to learn more.
Remembering that the mere use of php will not make your site dynamic, so rest assured. Use this so no one will see what you are doing, because php will embed in the main code:
<html>
<head></head>
<body>
<?php include 'main.php'; ?>
<!--- content code --->
<?php include 'footer.php'; ?>
</body>
</html>
Ready, then you create in the same folder where is the main file (that is calling the other files) the following files:
Inside them, put your html, it’s just that! a php file doesn’t necessarily have php, but if you need it, you already know that it accepts.
- When using html, don’t put html inside the php tag, for example:
<?php <div></div> ?>
. Put out the php tag just like you would in an html file, the usage is the same and of course, you can use html inside the php tag no more directly, there is a method specific to it.
In addition to my reply, you can also use the Html5 import that is already supported by all relevant browsers, only in some mobile browsers that still do not have full compatibility, as is the case with Safari, no new so far. Apple and Microsoft are very corporatist, take a while, resist at all costs if not developed by them, but in the end they implement.
– Macedo_Montalvão