Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8685721
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T22:38:46+00:00 2026-06-12T22:38:46+00:00

I am creating my portfolio site and I am wanting to include the head

  • 0

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 want to make changes later on to things later on like tidying up the css files.

For example;

<head>
    <?php include('head.php'); ?>
</head>

as opposed to all this below being shown on each and every page:

    <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title></title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width">

    <link rel="stylesheet" href="css/normalize.css">
    <link rel="stylesheet" href="css/main.css">
    <link rel="stylesheet" href="css/1140.css">
    <link rel="stylesheet" href="css/ie.css">
    <script src="js/vendor/modernizr-2.6.1.min.js"></script>
</head>

I just didn’t know if this was good practice to do, as with this being my portfolio site, I need the code to be correct from the start also as they will probably look into the standard of it also.

What are your opinions and advice people? Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T22:38:48+00:00Added an answer on June 12, 2026 at 10:38 pm

    Yep, it’s quite standard. But instead of writing:

    <head>
        <?php include('head.php'); ?>
    </head>
    

    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

    <html>
    <head>
    ...
    </head>
    <body>
    

    body.php

    ...
    

    footer.php

    </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating a portfolio page for m personal site. I have a slider
I am creating a portfolio page for m personal site. I have a slider
I am creating a portfolio page for my site. I want to display my
I am creating a portfolio site for a photographer. I am faced with the
I'm teaching myself Django and creating a personal portfolio site. I've setup a model
Right, last question for a while! I am creating a horizontal portfolio site and
I know that there are people out there creating classes for this (ie http://coreyoneil.com/portfolio/index.php?project=5
I am currently re creating my portfolio page , It is a work in
I'm working on a school project creating a CMS for my portfolio site. I
I have completed this tutorial on 'Creating a Filterable Portfolio with jQuery' from nettuts+

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.