The frames allow you to divide your screen
into 2 independent parts (or more).
The information concerning this operation are contained in an independent html document, it is often the index.html (to see lesson 2).
The Information are the following ones:
- vertical or horizontal division,
- size of the frames,
- name of each of them,
- address of the documents to be opened in each of the frames,
- text displays when the browser of your computer is too old and cannot open frames (noframes)
The attributes are the following
ones:
| rows | number of lines ( horizontal division) Value in percentage or pixels |
| cols | number of columns ( vertical division) Value in percentage or pixels |
| frameborder | border of the frames 'yes" or "no" |
| bordercolor | colour of the border |
| src | source |
| noresize | forbids the modification of the size of windows |
| scrolling | allows or not scrolling (values: yes, no, auto) |
| name | name of each frame |
| marginwidht | sets the margins in edge of frame |
| marginheight | margin at the top and in the bottom of page |
< html >
< frameset rows = " 90 %, * " frameborder = "yes"
>
< frame src = lecon_3.html noresize scrolling=yes
name=top >
< frame src=low.html scrolling=no name=bottom
>
< / frameset >
< noframes >
Your computer is not able to open frames,
to read the lesson please
< a href = " lecon.3.html " > click here.
< / a >
< / noframes >
< / html >
Example of vertical line frames :
< html >
< frameset cols = " 10%, * " frameborder = "yes"
>
< frame src=left.html scrolling=no name=left
>
< frame src = lecon_3.html noresize scrolling=yes
name=right >
< / frameset >
< noframes >
Your computer is not able of open frames,
to read lesson please click here.
< a href = " lecon.3.html " > click here.
< / h >
< / noframes >
< / html >
The attribute " target " of a hypertext link:
If a site is established with two windows
or more, it is necessary to clarify where a hypertext should appear
This precision is given with the address
of the hypertext link. We use for that purpose the
attribute " target ".
It is for that reason that we name
each of the windows
ex:<a href = " lecon3.html " target = " right " > the document " lecon3.html " will appear in the named window " right "
target = " blanck " places the document in a new window
Test " target = " blank " ", to return behind: close the document
Exercise:
- Modify the result of the exercise 2 by introducing frames
- It is possible to combine two frames like this, find the craftiness