+ Reply to Thread
Results 1 to 7 of 7
Like Tree3Likes
  • 1 Post By misson
  • 1 Post By essellar
  • 1 Post By itgeek2524

Thread: Simple HTML tag - need some help

  1. #1
    itgeek2524 is offline x10Hosting Member itgeek2524 is an unknown quantity at this point
    Join Date
    Oct 2011
    Posts
    6

    Simple HTML tag - need some help

    Hello, I am in need of some wuick help on one part of my coding. I want to know if there is a way to refernce a HTML file as a template for some codes that I can display on all pages by:
    script type="text/HTML" src="file.html"
    Is this possible or is there another tag i should be looking at?
    Thanks

  2. #2
    VPmase's Avatar
    VPmase is offline x10 Elder VPmase is an unknown quantity at this point
    Join Date
    Nov 2007
    Location
    Dixon, IL, USA
    Posts
    914

    Re: Simple HTML tag - need some help

    You should use CSS. Using div's and specific id's you can manipulate your pages with one script.
    http://w3schools.com/cssref/default.asp
    Last edited by VPmase; 10-13-2011 at 06:12 PM.

  3. #3
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,506

    Re: Simple HTML tag - need some help

    W3Schools is outdated, inaccurate and incomplete.

    CSS won't help here. You need to use some form of includes, which HTML doesn't support. Thankfully, there are other web technologies (such as PHP and server-side includes) that do. The topic has already been covered many times on these forums (e.g. "How do I put include files in html - what is the syntax please"); forum and web searches will reveal all you need to know.
    itgeek2524 likes this.
    Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
    Misson, not Mission.

  4. #4
    ngmanhmedia69's Avatar
    ngmanhmedia69 is offline x10Hosting Member ngmanhmedia69 is an unknown quantity at this point
    Join Date
    Jul 2011
    Posts
    7

    Re: Simple HTML tag - need some help

    Style sheet

  5. #5
    essellar's Avatar
    essellar is offline Community Advocate essellar has a spectacular aura about
    Join Date
    Feb 2010
    Location
    Toronto, Ontario, CA
    Posts
    1,153

    Re: Simple HTML tag - need some help

    Quote Originally Posted by ngmanhmedia69 View Post
    Style sheet
    Well, somebody wasn't paying attention. As misson said, CSS won't handle this -- it's a job for dynamic scripting (eg, PHP) or server-side includes. CSS can alter the appearance of the document, and can include either plain text or images to be placed before or after existing elements, but it cannot (yet) render HTML to the page. JavaScript can add HTML, but that depends on JavaScript being enabled in the browser (and it's not just a matter of adding a tag to a page).
    Last edited by essellar; 10-14-2011 at 11:24 AM. Reason: spelling
    itgeek2524 likes this.
    “Beware of bugs in the above code; I have only proved it correct, not tried it.” --Donald Knuth
    "It was as if its architects were given a perfectly good hammer and gleefully replied, 'neat! With this hammer, we can build a tool that can pound in nails.'" -- Alex Papadimoulis (on TheDailyWTF.com)

  6. #6
    ayobamigolden55 is offline x10Hosting Member ayobamigolden55 is an unknown quantity at this point
    Join Date
    Oct 2011
    Posts
    2

    Unhappy Re: Simple HTML tag - need some help

    A new to this forum pls i need a guidelines to build my site

  7. #7
    itgeek2524 is offline x10Hosting Member itgeek2524 is an unknown quantity at this point
    Join Date
    Oct 2011
    Posts
    6

    Re: Simple HTML tag - need some help

    Thanks everyone. The answer was PHP. I was trying to do it with HTML and Javascript and didn't get anywhere. I wasn't even thinking about PHP (which isn't really my strong point). Doing
    <?php
    include ('doc.php');
    ?>

    worked!
    Thanks again
    fuzeboxsoftware14 likes this.

+ Reply to Thread

Similar Threads

  1. Simple html drop down menus
    By richm8026 in forum Graphics & Webdesign
    Replies: 14
    Last Post: 10-15-2011, 02:30 PM
  2. can't place the Banner Ad on a simple HTML page
    By darkangel1988 in forum Free Hosting
    Replies: 3
    Last Post: 05-23-2008, 12:48 PM
  3. [req] simple html template
    By blaindugan in forum The Marketplace
    Replies: 14
    Last Post: 06-05-2006, 09:40 PM
  4. Simple ads in HTML
    By joejoe in forum Free Hosting
    Replies: 15
    Last Post: 03-24-2005, 05:13 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers