March 15th, 2010
I'm new to HTML and have been 'introduced' to a product cd that needs updating. A number of pages have duplicate information like company name and address. I was wondering if there is a way to put this information into a single file and include the information in that file onto each page.
Thanksall paid for hosting usually supports php and comes installed automatically, free hosts usually don't offer this.I would make the extra file an .inc file (or whatever, .inc helps me because it says what it is) and do a php include at the point where it is needed. Naturally your page has to have the php suffix, (or change the handling so html files are p****d)
HTHThanks but I'm not sure I grasp your meaning. It seems like CSS if for defining custom styles (ie font, attributes. etc). I haven't found any information that indicates I can use CSS for including text from a .css file to an html page. Do you have a reference?You neeed CSS..you put a link to the css file on each page
Link (http://www.hypergurl.com/csstutorial.html)
link-1 (http://www.adobe.com/tips/glv7css/main.html)
Why use CSS?
Cascading stylesheets allow you to control the layout of your page to look almost exactly as wanted.
To make pages smaller in size and to easily maintain many pages at once.
Free CSS Editor (http://www.bradsoft.com/download/index.asp)Thanks but I'm not sure I grasp your meaning. It seems like CSS if for defining custom styles (ie font, attributes. etc). I haven't found any information that indicates I can use CSS for including text from a .css file to an html page. Do you have a reference?
you can has css inside your document as inline style or extenal linked sheet. CSS makes it easy to style and position everything on your site and you don't have to make a bunch of page changes. One file changes all pages. Okay for CSS info, head over to w3c for tutorials etc and other info to find out more about CSS. However CSS to my knowledge does not insert file information, you would need the php what dabbler mentioned and you can find more php info at the main php.net website. This would be the easiest option for you, but it does take patience. HTH.Although the free hosts mentioned by tmmoose in THIS THREAD (http://developers.evrsoft.com/forum/showthread.php?p=20234#post20234) offer php (with a small banner).I think the php option is by far the easiest - even without knowledge of php!
The information you want to include is on a separate document - no headers etc, just the section of code, using (x)HTML tags, and the php code as above at the point you want it to appear. It will be included as part of the original page, and take its styling from the css for that page.
You only need to be sure that the server supports php, and have the .php suffix on your originating page: "whatever.php". You don't need any specialised knowledge at that stage.
You can do the same with a header, footer etc, so you only have this in one file, and not on every page of your site. It all works for smaller file sizes - and thus faster loading even with the php parsing.Thanks to all. I will look at php but if it is server dependent as dabbler suggests it really is not useful because if the server does not support it then I have to include the html code to display it normally anyway which means I still have to update all of the pages.#If you have any other info about this subject , Please add it free.# |
|
Posted in portal.gzpq.com | edit