HTML Old School

FRAME tag

Frame tag is used inside <frameset></frameset> tag.

<frameset cols="30%,*">
    <frame src="./doc_a.html">
    <frame src="./doc_b.html">
</frameset>

 

Frame tag is not container, it is void tag, so dont write closing tag </frame>.

The number of frame tags determine COLS and ROWS attributes of frameset tag. What happend if we define 3 columns in frameset tag and place only one frame tag see in the next example:

Example (frameset defines 3 columns but we have only one frame tag): 07fr.htm

 

 

Frame tag attributes

1. src="URI"

Defines path to the HTML document.

Example: 08frsrc.htm

 

2. name="string"  ,  id="string"

Very important when linking two frames.

 

3. noresize

Prevent resizing of frame window.

Noresize example: 09frnores.htm

 

4. scrolling="yes | no | auto"

Enable/disable scrolling of content inside frame. If enabled then scrollbar appers.

Scrollbar example: 10frscrl.htm

Example with scrollbar: 10frscrl2.htm

 

5. marginwidth="px" i marginheight="px"

Defines how much pixels will be the content way from border.

How to place image in the left-top corner: 11frm.htm

 

6. frameborder="yes | 1 | no | 0"

Enable/disable frame border.

Example: 12frfb.htm

 

7. bordercolor="color"

Determine the border color.

Example: 13frbc.htm