What html code allows your page to display other pages?

What html code allows your page to display other pages?

When I open the one pages, maybe three other pages appear, not the one I opened.

I used to do this all the time in the 1990s but I forgot.

Is there anyone reading my words here?

I guess not! I don’t know how to use this site.

things have changed since the 90’s.

<iframe> allow you to embed a page within a page. Is that what you mean?

No. I learned how to do that (iframes) in the 90’s.

What I mean is if you create three pages called A.htm, B.htm, and C.htm, and then you create another html page, like index.htm, and when index.htm opens, all anyone can see are the three pages in a row at the dimensions specified in index.htm.

The three pages can be horizontally aligned or vertically aligned.

And, you can do the same with pages A, B, and C. You could create A so that when it opens all you see is D and E.

That means if you created A, B, and C to be side by side instead of above or below each other, then you could create D and E to appear in the spot designated for A with D on top of E.

It also means it’s impossible for anyone to view the page source of index because when they put their cursor on A, B or C, the can only see the page source of A, B or C.

And, if A is used to display other pages in it’s place, it means you cannot view the page source of A either, but you can view the page source of the pages appearing in the place of A.

And, if you code the pages to have no scroll bars, the final viewing result, no matter how many different pages (I have done nine pages) all appear with no edges as if one page.

So, for example, you could have a banner ad page across the top, a home page in the centre, and a page for links like home, menu, about, contact, going across the bottom, with all links on any of those three pages opening either in the centre (so that the menu bar at the bottom stays visible permanently and the banner ad stays visible permanently, but the home page changes with whichever link is clicked, and you can always return to the home page through the home link at the bottom which is permanently visible while at the site.

What is the practical use for all this?

Ads on the right side of the page that don’t move, unless you allow scroll bars.

A menu on the left that doesn’t move.

A banner ad across the top that doesn’t move.

An ad across the bottom (perhaps scrolling) that is always visible.

You can even put ads or promos in each corner of the browser that will always be visible, no matter how many pages are visited in the centre.

Frames and tables you have to include into every page, if you are only working with html.

Can you see another way of accomplishing all this?

Should I conclude that I have stumped Code Academy?

no, but the first part of a problem is understanding the requirements.

sounds like you want to use position:

https://developer.mozilla.org/en-US/docs/Web/CSS/position

and then mostly absolute and fixed

so the ads are not allowed to be reloaded when you switch page?

this is no longer done with frames (thankfully), we can do this much more dynamic now with vueJS or reactJS (or even jquery or just plain JS).

I apologize if I sounded obnoxious with the “stumped” comment. Please forgive me.

But, now, you’ve stumped me because I don’t know CSS or JS. I only know html.

I’m guessing you guys probably can’t help me, not because you aren’t capable but because I’m not capable.

Brian

We can help you by pointing in the right direction, and answer some of your questions, but i am afraid you will have to write the code

okay, now i know what you know, lets revise my previous answer, i recommend you to learn CSS, so you can use position, that should be a good starting point to make the layout of your site.

1 Like

I quite liked frames, back in the day. :stuck_out_tongue:

If all you’re after is serving relatively static pages, where the areas around the side/top remain pretty much the same but the main content area in the middle(ish) is what changes from page to page then you could use Jekyll?

You’d likely need a handle on CSS to do what you’re after, though not necessarily JS.

In terms of building the layout, you might want to look at something like Bootstrap which has a lot of “pre-built” building blocks that you can throw together to build sites.

Helpfully, Codecademy have courses on both CSS and Bootstrap if you’re wanting to learn more about them. :slight_smile:

1 Like