1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

i want to embed one HTML page to another HTML page

Discussion in 'HTML & Website Design' started by infogle, Oct 11, 2021.

  1. #1
    Hello,

    Please someone help me - i want to embed one html page to another HTML page just as header like it has on codecanyon when you see demo of anything.

    kindly help any help would be appreciated.
     
    infogle, Oct 11, 2021 IP
  2. hdewantara

    hdewantara Well-Known Member

    Messages:
    536
    Likes Received:
    47
    Best Answers:
    25
    Trophy Points:
    155
    #2
    Hi,
    people usually use iframe.
    perhaps you could tell which demo you see in codecanyon that shows page embedding?
     
    hdewantara, Oct 12, 2021 IP
  3. infogle

    infogle Prominent Member

    Messages:
    2,732
    Likes Received:
    128
    Best Answers:
    1
    Trophy Points:
    300
    #3
    in codecanyon when you hit preview new page open for preview with their header that is sticky and does not move like that kind off
     
    infogle, Oct 13, 2021 IP
  4. gnu

    gnu Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #4
    You should use the elements iframe or embed. You could even use the element object, however, in HTML5, iframe is the recommended option.
     
    gnu, Oct 17, 2021 IP
  5. sarahk

    sarahk iTamer Staff

    Messages:
    28,498
    Likes Received:
    4,460
    Best Answers:
    123
    Trophy Points:
    665
    #5
    Takes less than a minute to read the source and see that they're using iframes

    upload_2021-10-18_11-43-20.png
     
    sarahk, Oct 17, 2021 IP
  6. shalom_m

    shalom_m Member

    Messages:
    49
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    33
    #6
    The simplest way to embed is with iframe:

    <iframe src=" path/ExternalFile.html" height="400" width="500" title=" ExternalFile Example"></iframe>

    However, I personally prefer using the “include” function:

    <!--#include virtual="path/ExternalFile.shtml" -->

    Which brings the whole external file in to be part of the home-file code.
    Note: If you are using the include option, you will have to add the following to your .htaccess file:

    AddType text/html .html

    AddType text/html .shtml

    AddHandler server-parsed .html

    AddHandler server-parsed .shtml
     
    shalom_m, Nov 19, 2021 IP