0
Assuming I have a file called home.php and he’s got the following codes:
<html>
<head>
    <p>Head do home.php</p>
</head>
<body>
    <span>Body do home.php</span>
</body>
</html>
Then I also have the file menu.php:
<html>
<head>
    <p>Head do menu.php</p>
</head>
<body>
    <div>
        <span>Body do menu.php</span>
    </div>
</body>
</html>
And I also have for example a file to include the files by header, the ìncludes.php for example:
<html>
<head>
    <script type="text/javascript"></script>
    <script type="text/javascript"></script>
    <link rel="stylesheet" type="text/css">
    <link rel="stylesheet" type="text/css" href="">
</head>
<body>
</body>
</html>
And there’s the file structure(home.php, contato.php, pedidos.php and so it goes...) would look like this:
<?php
include_once 'includes.php';
include_once 'menu.php';
?>
<html>
<head>
    <p>Head do home.php/contato.php e por ai vai...</p>
</head>
<body>
    <span>Body do home.php/contato.php e por ai vai...</span>
</body>
</html>
Everything works correctly, however, if we are going to inspect the code of the page, we see as follows (with several repetitions of the tags <html> and <body>, this may give problem or the browsers correct?):
 <html>
<head>
    <script type="text/javascript"></script>
    <script type="text/javascript"></script>
    <link rel="stylesheet" type="text/css">
    <link rel="stylesheet" type="text/css">
</head>
<body>
</body>
</html><html>
<head>
    <p>Head do menu.php</p>
</head>
<body>
    <div>
        <span>Body do menu.php</span>
    </div>
</body>
</html><html>
<head>
    <p>Head do home.php/contato.php e por ai vai...</p>
</head>
<body>
    <span>Body do home.php/contato.php e por ai vai...</span>
</body>
</html>
						
Working works (maybe not in IE), but working is not always correct or the best way
– Costamilam