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 8505665
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T02:23:05+00:00 2026-06-11T02:23:05+00:00

<head> <meta charset=utf-8> <link rel=stylesheet type=text/css href=css/style.css/> <link rel=stylesheet type=text/css href=css/homepage.css/> <link rel=stylesheet type=text/css

  • 0
<head>
    <meta charset="utf-8">
    <link rel="stylesheet" type="text/css" href="css/style.css"/>
    <link rel="stylesheet" type="text/css" href="css/homepage.css"/>
    <link rel="stylesheet" type="text/css" href="css/header.css"/>
    <link rel="stylesheet" type="text/css" href="css/footer.css"/>
    <link rel="stylesheet" type="text/css" href="css/navmenu.css"/>
    <!-- more css here -->
    <script type="text/javascript" src="js/jQuery.js"></script>
    <script type="text/javascript" src="js/navmenu.js"></script>
    <!-- more js here -->
</head>

i have all of that external css and javascripts inside the <head></head> tag in all of my pages and all of that are important in all pages.. is it appropriate to put all of that in a separate file and just include that using php? so if i want to make some changes on those externals it would be easy for me, because it will affect all my pages.. i just want to know if it is a good practice.. thanks in advance

  • 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-11T02:23:06+00:00Added an answer on June 11, 2026 at 2:23 am

    Yes, it is. But why stop there? Ideally you should have all of your repetitive markup in a single file.

    There are numerous approaches to sharing common markup in PHP, but the simplest way is to have a global “Top.php” and “Bottom.php” files, like so:

    In Top.php:

     <html>
     <head>
          <title><?php echo $pagetitle; ?></title>
          <!-- your <meta /> elements go here -->
     </head>
     <body>
          <!-- common page elements go here -->
    

    In Bottom.php:

     </body>
     </html> <!-- This ensures all of the common markup is closed -->
    

    Then for each page, do this:

     <?php $pageTitle = "This page's title";
     require("Top.php"); ?>
     <!-- put your per-page markup and PHP code here -->
     <?php require("Bottom.php"); ?>
    

    Simples.

    Now how I use require() instead of include(). The require function is more strict and basically ensures that the included files exist. I think it’s better for an application to visibly break than to fail silently.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is the html: <html> <head> <meta http-equiv=Content-Type content=text/html; charset=UTF-8/> <link rel=stylesheet type=text/css href=styles.css/>
<!DOCTYPE html> <html> <head> <meta charset=utf-8 /> <title>Remote Control</title> </head> <link rel=stylesheet href=/../.. type=text/css
I add a stylesheet to codeigniter: <head> <meta charset=utf-8> <title>Site Administrator</title> <link rel=stylesheet href=../../css/administrator.css
<!DOCTYPE HTML> <html lang=en> <head> <meta charset=utf-8> <title>Amateur</title> <link rel=stylesheet href=css/reset.css type=text/css> <script src=http://code.jquery.com/jquery-1.8.0.js>
HTML: <html> <head> <meta http-equiv=Content-Type content=text/html; charset=UTF-8> <title></title> <link type=text/css href=galerina.css rel=stylesheet/> </head> <body>
the Html is : <!DOCTYPE HTML> <html lang=en-US> <head> <meta charset=UTF-8> <link rel=stylesheet href=wp-1-main.css>
<!DOCTYPE html> <html> <meta http-equiv=Content-Type content=text/html;charset=utf-8/> <head> <title>temp</title> <link rel=stylesheet href=style.css/> <script type=text/javascript src=http://code.jquery.com/jquery-1.7.2.js></script>
<!DOCTYPE html> <html> <head> <meta http-equiv=Content-Type content=text/html; charset=utf-8/> <title>FAQ Section</title> <link rel=stylesheet type=text/css href=styles.css/>
I have the following page: <!DOCTYPE html> <html> <head> <meta charset=utf-8> <title>Title</title> <link rel=stylesheet
<html> <link rel=stylesheet type=text/css media=screen href=blogstyle.css> <title>Welcome to my blog</title> <body> <frameset cols=10%,60%,30% border=0

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.