html - What is the subsitute for frames? -


lets have web site 50 web pages. each page consists of

  1. a header
  2. navigation
  3. left side content
  4. right side content
  5. footer

without using

  1. frames
  2. server side programming
  3. third part tools , softwares
  4. frameworks

i need put code (html markup) each of these 5 sections in each of 50 pages? happened term "code once, use again & again"? if want change thing, need change @ 50 places. reduntant. can use such.

<object type="text/html" height="100%" width="100%" data="header.html"></object> 

excuse stupid questions. learning hardway!

you describe exact use case server-side language.

let me explain problem approach. if site way, having index.html , other 5 parts include through either object or iframe, mean 6 requests server (which not practice).

things happen this:

  • browser requests index.html
  • parses , finds needs request header.html , 4 others
  • requests 5 htmls server

instead, request index.php example (if use php), let php construct one html resource (possibly including other php files, header.php) , send browser, happily display it.

you don't have break learning order, use small parts specific purpose (using 1 command @ all). flexible, find useful in business :).

to give example:

index.php

<!doctype html> <html> ... <body>  <?php include 'header.php'; ?>  <?php include 'navigation.php'; ?>  ...  <?php include 'footer.php'; ?>  </body> </html> 

in php files, can have simple html, file extension different. write php commands can use <?php whatever ?>


Comments