Pavlos1316 Pavlos1316 - 3 days ago 6
HTML Question

HTML structure?

I think this one is simple just explain it a bit please...

Supose I have this index.php (Don't look for script errors)

<html>
<head>
</head>
<body>
require(home.php)
</body>
</html>


And my home.php (I saw this somewhere and I am wondering, even if it is working is it wrong?)
Instead of having again the normal html structure as above, you have:

<body>
some code
</body>


LEAVING OUT all the other tags.

Is this correct? Yes? No? Why?

Thank you

Edit: What if I am calling a js script in my head tag? Would the home.php inherite it?

Answer

It probably shouldn't have the <body> tag again, but otherwise okay.

Comments