May 03, 2021 HTML5
2. Label definition and instructions for use
4. The difference between HTML 4.01 and HTML5
Mark an inline framework with html5 and iframe.gt; tags:
<iframe src="http://www.w3cschool.cn"></iframe>
Try it out . . .
All major browsers support the hashtags.
The label specifies an inline framework.
One inline framework is used to embed another document in the current HTML document.
Tip: You can place the text you want between the slt; iframe and slt;/iframe sgt; so that you can handle browsers that don't support the slt; iframe.
Tip: Use CSS to define styles for slt;iframe,including scroll bars.
HTML5 has added some new properties and removed some of the properties from HTML 4.01.
In XHTML, the name property is discarded and will be removed. Use the id property instead.
New: The new property in HTML5.
Property | Value | Describe |
---|---|---|
align (abandoned) |
left
right top middle bottom |
HTML5 is not supported. H TML 4.01 is obsolete. Specify how to align according to the surrounding elements. |
frameborder |
1
0 |
HTML5 is not supported. Specify whether to display the border around the . |
height | pixels | Specifies the height of the slt;iframe. |
longdesc | Url | HTML5 is not supported. Specify a page that contains a longer description of the . |
marginheight | pixels | HTML5 is not supported. Specify the margins at the top and bottom of the slt;iframe. |
marginwidth | pixels | HTML5 is not supported. Specify the margins on the left and right sides of the . |
name | name | Specifies the name of the name of the slt;iframe. |
sandbox New |
""
allow-forms allow-same-origin allow-scripts allow-top-navigation |
Define a series of additional restrictions on the content of slt;iframe. |
scrolling |
yes
no auto |
HTML5 is not supported. Specify whether to display a scroll bar in slt;iframe. |
seamless New | seamless | The rule is that it looks like part of the parent document. |
Src | Url | Specifies the URL of the document that is displayed in slt;iframe. |
srcdoc New | HTML_code | The HTML content on the specified page is displayed in slt;iframe. |
width | pixels | Specifies the width of the slt;iframe. |
The label supports the global properties of HTML.
The tag supports the event properties of HTML.
HTML tutorial: HTML framework
HTML DOM Reference Manual: IFrame Object