May 02, 2021 HTML
2. Iframe - Set height and width
4. Use iframe to display the directory link page
7.. HTML slt;frameset-tags - HTML5 does not support
<iframe>
an inline framework.
One inline framework is used to embed another document in the current HTML document.
By using frames, you can display more than one page in the same browser window.
iframe syntax:
<iframe src="URL"></iframe>
The
URL
to a different page and displays the contents of the window as a URL
URL
pointing to the page.
height
and
width
define the height and width of the
iframe
label.
Properties default to pixels, but you can specify that they are displayed proportionally (e.g.: 80%).
frameborder
defines
iframe
indicates whether the border is displayed.
Set the property value to "0" to remove the border of the
iframe
iframe
can display a target link page
The properties of the target link must use
iframe
as follows:
Label | illustrate |
---|---|
<iframe> | Define an inline IFRAME |
Attributes | illustrate |
---|---|
class
|
Classname of the specified element (classname)
|
id |
Unique ID of the specified element
|
style |
Inline Style in the line style of the specified elements
|
title | Present information of the specified elements (can be displayed in tooltips) |
<frameset>
sets one or more frames in a single
</body>
page, replacing the
<frameset>
</frameset>
and
<body>
not appear in the
body
label.
syntax:
<frameset>
<frame src="menu.html">
<frame src="content.html">
</frameset>
frameset
- Establishes a tag for the framework in which each framework is defined.
frame src
- indicates the URL address of the content displayed by the frame.
<frameset>
that we use
rows
to set rows in the label; the percentage of columns we set up in the
cols
<frameset rows="20%,*">
<frame src="title.html">
<frameset cols="30%,*">
<frame src="menu.html">
<frame src="content.html">
</frameset>
</frameset>
frameset cols
- Determines the percentage of each frame column.
In the previous example, we determined that the first frame would occupy 30% of the area
“*”
symbol to indicate the remaining percentage.
frameset rows
- Determines the percentage of each frame line that will be displayed.
In the previous example, we chose the first frame to be 20%, and the remaining
menu.html
the menu .html content and
content.html
The frame has some border lines that are not required most of the time.
<frameset>
the
frameborder
framespacing
to erase them.
Note:
frameset
frameborder
same properties.
<frameset border="0" frameborder="0" framespacing="0" rows="20%,*">
<frame src="title.html">
<frameset border="0" frameborder="0" framespacing="0" cols="30%,*">
<frame src="menu.html">
<frame src="content.html">
</frameset>
</frameset>
frameborder
- Set the border, and a value of 0 indicates that there is no border
border
- Modify the weight of the border (used by Netscape browser)
framespacing
- Modify the weight of the border (used by Internet Explorer browser)
<frame>
frame with
name
property, not the content page.
<frameset rows="20%,*">
<frame name="title" src="title.html">
<frameset cols="30%,*">
<frame name="menu" src="menu.html">
<name="content" src="content.html">
</frameset>
</frameset>
<frame>
use the
noresize
setting to prevent the user from dragging the frame size;
scrolling
whether the scroll bar is displayed or not.
<frameset border="2" frameborder="1" framespacing="2" rows="20%,*">
<frame src="title.html" noresize scrolling="no">
<frameset border="4" frameborder="1" framespacing="4" cols="30%,*">
<frame src="menu.html" scrolling="auto" noresize>
<frame src="content.html" scrolling="yes" noresize>
</frameset>
</frameset>
noresize
- Does not allow users to change their size.
scrolling
- Set whether the scroll bar is displayed.