How To Insert A Page Into A Page

Table of contents:

How To Insert A Page Into A Page
How To Insert A Page Into A Page

Video: How To Insert A Page Into A Page

Video: How To Insert A Page Into A Page
Video: How to Insert a Blank Page in Word; Add Blank Page; Add New Page 2024, December
Anonim

One way to insert a page into a page is to use the HyperText Markup Language (HTML) ability to split the page into separate windows. Such windows are called "frames" and there can be several of them in one page. Each frame, in turn, can itself contain a set of frames, and each of them can be loaded with pages from different sources.

Inserting a page into a page using frames
Inserting a page into a page using frames

It is necessary

Text Editor Notepad

Instructions

Step 1

To build such a set of pages in a page, you start by creating a container for frames. The instruction to the browser to create such a container in HTML looks like this:

Such instructions are called "tags". These are the opening and closing tags of the container, between which tags should be placed to form the frames. Tags contain various additional information called "attributes" of tags. In the opening tag, you need to specify how exactly the page space should be divided between frames:

Here, the "cols" attribute indicates that the page of two frames should be split vertically, giving each one 50% of the window's width. To split the page horizontally, another attribute is used, "rows":

The same can be written in this way:

Here, an asterisk (*) indicates that all the remaining space should be given to the second frame. You can specify values not in percentages, but in "pixels" - this is the main unit of measurement used in page layout:

Step 2

We have dealt with the container, now we need to enter the frames themselves into it. The HTML frame tag in its simplest form looks like this: Here the "src" attribute indicates the Internet address of the page that should be loaded into this frame. If the page is located on the same server and in the same folder (or subfolder), then it is not necessary to specify the full address, the file name and path to the subfolder are enough. Such addresses are called "relative", and full addresses are called "absolute". The same tag with the relative address of the page for loading: - Using the "scrolling" attribute, you can set the rules for the scrollbars of this frame: The value "yes" means that this frame will always have scrollbars. If you insert the value "no" - they will never be, and the value "auto" determines that the scrollbars will appear as needed if the content of the frame does not fit into its borders. - By default, the borders of frames in the page can be moved with the mouse. But if you set the noresize attribute to the tag, then this feature will be disabled: - The frame tag has two attributes that set the margins between adjacent frames - marginwidth indicates the size of the margin from the adjacent margin horizontally (left and right), marginheight - vertically (below and above): - Another attribute - name - gives its own name to the frame. This may be needed if the frames contain any scripts that must do something in adjacent frames and distinguish them by names:

Step 3

This theoretical background is enough to create a simple page containing, for example, two pages from other sites. A simple text editor will be enough for you - a standard notepad is fine. Create a new document and enter the following html code into it:

Now save your document with an html extension - for example, test.html. After that, double-clicking on the test.html file will launch the browser, and the browser will execute the instructions that you wrote to it in the html-code. The result should look like this:

Recommended: