I am creating my portfolio site and I am wanting to include the head section as a php include on my page. Reason being is because the site will have a fair few pages and I will
Yep, it's quite standard. But instead of writing:
you should put the tags inside head.php
. I say it's better because what's inside head.php
has no sense without the head tags, so they are kinda linked together. It's good practice to join things so linked into a single file without having to repeat open and close head
tags for each page.
Actually, it's even good practice (and commonly used) to have header.php
, body.php
and footer.php
files that has respectively:
header.php
...
body.php
...
footer.php