Iframe usage and iframe usage
<Iframe src = "http://caiyanli.top/" height = "500" width = "500" frameborder = "0"
Marginheight = "2" marginwidth = "0" scrolling = "yes"> </iframe>
Note: iframe h5 adds a label. The element will create an inline framework (intra-row framework) containing another document ).
You can place the required text between <iframe> and </iframe> to handle browsers that cannot understand iframe.
Iframe attributes and values and functions
Attribute |
Value |
Function |
Frameborder |
|
Specifies whether to display the border around the frame. |
Height |
|
Specify the iframe height. |
Longdesc |
URL |
Specifies a page that contains a long description of iframe. |
Marginheight |
Pixels |
Defines the top and bottom margins of iframe. |
Marginwidth |
Pixels |
Defines the left and right margins of iframe. |
Name |
Frame_name |
Specifies the iframe name. |
Sandbox |
- ""
- Allow-forms
- Allow-same-origin
- Allow-scripts
- Allow-top-navigation
|
Enable a series of additional restrictions on the content in <iframe>. |
Scrolling |
|
Specifies whether to display the scroll bar in iframe. |
Seamless |
Seamless |
The rule <iframe> looks like a part of the document. |
Src |
URL |
Specifies the URL of the document displayed in iframe. |
Srcdoc |
HTML_code |
Specifies the HTML content of the page displayed in <iframe>. |
Width |
|
Defines the iframe width. |
Code:
<! DOCTYPE html>
<Html lang = "en">
<Head>
<Meta charset = "UTF-8">
<Title> my webpage </title>
</Head>
<Body bgcolor = "# ff9900">
<H1> my webpage <Hr>
<Iframe src = "http://caiyanli.top/" height = "500" frameborder = "0" marginheight = "2" marginwidth = "0" scrolling = "yes"> cannot see me </iframe>
</Body>
</Html>