If you want to use PHP code for your question you can use like this.
For example you have header,container and footer area for your website.
use like this it works for you if i understand your question.
your index.php inside :
header.php
container.php
footer.php
your header.php
is
<html>
<head>
<link href="style.css">
....
</head>
container.php code inside is
<body>
<div class="MainWrap">..div inside element...</div>
the last page footer.php inside must be have your footer code
<div class="footer">..footer inside div element..</div>
</body>
</html>
you can use footer.php and header.php your all webpage
so your index.php code looks like this
<?php include("header.php");?>
<?php include("container.php");?>
<?php include("footer.php");?>
so for example you have another page contact.php
this page inside code is:
<?php include("header.php");?>
<?php include("contact_.php");?>
<?php include("footer.php");?>