You are here: "common" HTML import file « HTML « IT news, forums, messages
"common" HTML import file

Posted by Hortich on 05/22/05 12:32

Hi, I am new to HTML but not to programming. I have a simple HTML question.
I am going to be verbose as I want you to understand my problem (rather than
just asking how to do something).

I have pasted the contents of my file "one.htm" below. I also have files
"two.htm", "three.htm", and "four.htm". In all these files, the section

<head>
<style type="text/css">
@import "myCSS.css";
</style>

<div class="s1">
<p><a href="one.htm">One</a></p>
<p><a href="two.htm">Two</a></p>
<p><a href="three.htm">Three</a></p>
<p><a href="four.htm">Four</a></p>
</div>
</head>

is identical. The rest of the file content is very different. I would like
to "import" somehow this same text from a file into each of my HTML pages.
The reason I want to do this is because in my real HTML pages, I have 36
pages and I don't want to change each one of them each time I want to add a
new page (eg "<p><a href="five.htm">Five</a></p>" in the above example). I
think I want to take the code above and put it in a file called
"common.htm", then in each of my 36 other HTML pages I want to say something
like @import "common.htm". I then change my file "common.htm" once and all
the changes are replicated in all 36 other pages. I am not sure how to do
this, or if it can be done, but I am sure I do not want to go down the
"frames" route.

I would really appreciate some guidance here, or just the basic vocab to use
so I can google out the information.

Thank you

Hortich


Here is the content on "one.htm".



<html>

<head>
<style type="text/css">
@import "myCSS.css";
</style>

<div class="s1">
<p><a href="one.htm">One</a></p>
<p><a href="two.htm">Two</a></p>
<p><a href="three.htm">Three</a></p>
<p><a href="four.htm">Four</a></p>
</div>
</head>

<body>
<div class="s2">
this is the body in the html page for one.htm.
this is the body in the html page for one.htm.
this is the body in the html page for one.htm.
this is the body in the html page for one.htm.
this is the body in the html page for one.htm.
this is the body in the html page for one.htm.
this is the body in the html page for one.htm.
this is the body in the html page for one.htm.
</div>
<body>

</html>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация