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

  • Home
  • SEARCH
  • 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 604537
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T17:02:58+00:00 2026-05-13T17:02:58+00:00

I don’t know how those elements are usually separated by professional web designers: like

  • 0

I don’t know how those elements are usually separated by professional web designers:

like this:

<?php include("head.php"); ?>
<?php include("lang.php"); ?>
<?php include("nav.php"); ?>

or just like this

<?php include("head.php"); ?>
<?php include("header.php"); ?>

or just placing all the elements that I want to repeat together:

<?php include("head-header.php"); ?>

Should I use php or html extensions in those elements? (head,nav, etc..)?

What should I do with the <title> tag?

The whole HTML (or PHP?):

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/>
 <title>New Project</title>
 <link rel="stylesheet" type="text/css" href="styles/global.css" />
 <link rel="stylesheet" type="text/css" href="styles/home.css" />
 <script type="text/javascript" src="scripts/jquery-1.3.2.min.js"></script>
 <script type="text/javascript" src="scripts/jquery.corner.js"></script>
 <script type="text/javascript" src="scripts/custom.js"></script>
</head>
</head>
<body id="home">
<div id="header">
 <div class="container">
  <div id="topbar">
   <h1><a href="http://widerdesign.co.nr/">wider design</a></h1>
   <ul id="lang">
    <li><a href="index.php">English</a></li>
    <li><a href="es/index.php">Español</a></li>
    <li><a href="tw/index.php">中文(繁體)</a></li>
    <li><a href="cn/index.php">中文(简体)</a></li>
   </ul>
   <ul id="nav">
    <li class="home"><a href="index.html">home</a></li>
    <li class="portfolio"><a href="portfolio.php">portfolio</a></li>
    <li class="about"><a href="about.php">about</a></li>
    <li class="contact"><a href="form.html">contact</a></li>
   </ul>
  </div>
 </div>
</div>
<div id="content">
 <div class="container">
  <div id="tagline">
   <div>
    <h2><strong>Maecenas nisl quam</strong>, volutpat ut tincidunt quis, rutrum quis nibh. Nulla est nunc, pellentesque ac dictum ac, condimentum convallis odio.</h2>
    <p>Maecenas nisl quam, volutpat ut tincidunt quis, rutrum quis nibh. Nulla est nunc, pellentesque ac dictum ac, condimentum convallis odio. Maecenas nisl quam, volutpat ut tincidunt quis, rutrum quis nibh. Nulla est nunc, pellentesque ac dictum ac, condimentum convallis odio. Maecenas nisl quam, volutpat ut tincidunt quis, rutrum quis nibh. Nulla est nunc, pellentesque ac dictum ac, condimentum convallis odio.</p>
   </div>
   <a href="#"><img src="images/project3.png"/></a>
  </div>
  <div id="mainbar">
   <h2>Featured Work</h2>
       <div class="pusher">
     <a href="#"><img src="images/project3.png"/></a>
     <div id="info">
      <h2><a href="index.html">Best Language School</a></h2>
      <p>Maecenas nisl quam, volutpat ut tincidunt quis, rutrum quis nibh. Nulla est nunc, pellentesque ac dictum ac, condimentum convallis odio.</p>
     </div>
    </div>
    <div class="pusher">
     <a href="#"><img src="images/project3.png"/></a>
     <div id="info">
      <h2><a href="index.html">Best Language School</a></h2>
      <p>Maecenas nisl quam, volutpat ut tincidunt quis, rutrum quis nibh. Nulla est nunc, pellentesque ac dictum ac, condimentum convallis odio.</p>
     </div>
    </div>
    <div class="pushed">
     <a href="#"><img src="images/project3.png"/></a>
     <div id="info">
      <h2><a href="index.html">Best Language School</a></h2>
      <p>Maecenas nisl quam, volutpat ut tincidunt quis, rutrum quis nibh. Nulla est nunc, pellentesque ac dictum ac, condimentum convallis odio.</p>
     </div>
    </div>
   </div><!-- #mainbar -->
  </div><!-- .container -->
 </div><!-- #content -->
<div id="footer">
 <div class="container">
  <div id="bottombar">
   <p>Copyright © 2009 New Project. All Rights Reserved. </p>
  </div>
 </div>
</div>
</body>
</html>

What’s the best practice?

  • 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-05-13T17:02:58+00:00Added an answer on May 13, 2026 at 5:02 pm

    Don’t know about best practice, but my approach has always been header-content-footer. Everything that becomes before the actual content (including <div id="content"> etc.) goes into the header and everything after the content to the footer. This way you don’t have any layout related markup in your actual content and can modify the appearence more easily.

    I don’t see any reason splitting the header in many parts, as that usually is quite small in terms of lines. Also all additional includes will slow the page generation down a bit.

    Also, it’s best to save the files as .php as you probably will need some logic in them at some stage.

    As a practical example, here’s how I would cut your layout:

    header.php

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html>
    <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/>
     <title>New Project</title>
     <link rel="stylesheet" type="text/css" href="styles/global.css" />
     <link rel="stylesheet" type="text/css" href="styles/home.css" />
     <script type="text/javascript" src="scripts/jquery-1.3.2.min.js"></script>
     <script type="text/javascript" src="scripts/jquery.corner.js"></script>
     <script type="text/javascript" src="scripts/custom.js"></script>
    </head>
    </head>
    <body id="home">
    <div id="header">
     <div class="container">
      <div id="topbar">
       <h1><a href="http://widerdesign.co.nr/">wider design</a></h1>
       <ul id="lang">
        <li><a href="index.php">English</a></li>
        <li><a href="es/index.php">Español</a></li>
        <li><a href="tw/index.php">中文(繁體)</a></li>
        <li><a href="cn/index.php">中文(简体)</a></li>
       </ul>
       <ul id="nav">
        <li class="home"><a href="index.html">home</a></li>
        <li class="portfolio"><a href="portfolio.php">portfolio</a></li>
        <li class="about"><a href="about.php">about</a></li>
        <li class="contact"><a href="form.html">contact</a></li>
       </ul>
      </div>
     </div>
    </div>
    <div id="content">
     <div class="container">
    

    content.php

      <div id="tagline">
       <div>
        <h2><strong>Maecenas nisl quam</strong>, volutpat ut tincidunt quis, rutrum quis nibh. Nulla est nunc, pellentesque ac dictum ac, condimentum convallis odio.</h2>
        <p>Maecenas nisl quam, volutpat ut tincidunt quis, rutrum quis nibh. Nulla est nunc, pellentesque ac dictum ac, condimentum convallis odio. Maecenas nisl quam, volutpat ut tincidunt quis, rutrum quis nibh. Nulla est nunc, pellentesque ac dictum ac, condimentum convallis odio. Maecenas nisl quam, volutpat ut tincidunt quis, rutrum quis nibh. Nulla est nunc, pellentesque ac dictum ac, condimentum convallis odio.</p>
       </div>
       <a href="#"><img src="images/project3.png"/></a>
      </div>
      <div id="mainbar">
       <h2>Featured Work</h2>
           <div class="pusher">
         <a href="#"><img src="images/project3.png"/></a>
         <div id="info">
          <h2><a href="index.html">Best Language School</a></h2>
          <p>Maecenas nisl quam, volutpat ut tincidunt quis, rutrum quis nibh. Nulla est nunc, pellentesque ac dictum ac, condimentum convallis odio.</p>
         </div>
        </div>
        <div class="pusher">
         <a href="#"><img src="images/project3.png"/></a>
         <div id="info">
          <h2><a href="index.html">Best Language School</a></h2>
          <p>Maecenas nisl quam, volutpat ut tincidunt quis, rutrum quis nibh. Nulla est nunc, pellentesque ac dictum ac, condimentum convallis odio.</p>
         </div>
        </div>
        <div class="pushed">
         <a href="#"><img src="images/project3.png"/></a>
         <div id="info">
          <h2><a href="index.html">Best Language School</a></h2>
          <p>Maecenas nisl quam, volutpat ut tincidunt quis, rutrum quis nibh. Nulla est nunc, pellentesque ac dictum ac, condimentum convallis odio.</p>
         </div>
        </div>
       </div><!-- #mainbar -->
    

    footer.php

      </div><!-- .container -->
     </div><!-- #content -->
    <div id="footer">
     <div class="container">
      <div id="bottombar">
       <p>Copyright © 2009 New Project. All Rights Reserved. </p>
      </div>
     </div>
    </div>
    </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

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.