Содержание
- HTML Tag
- Browser Support
- Attributes
- HTML Iframes
- HTML Iframe Syntax
- Syntax
- Iframe — Set Height and Width
- Example
- Example
- Iframe — Remove the Border
- Example
- Example
- Iframe — Target for a Link
- Example
- Chapter Summary
- HTML Exercises
- HTML iframe Tag
- COLOR PICKER
- Report Error
- Thank You For Helping Us!
- HTML Tag
- Syntax
- Example of an HTML Tag:
- Example of an HTML Tag With the Height and Width Attributes :
- Example of an HTML Tag With the CSS Border Property:
- The new loading attribute
- Attributes
HTML Tag
An inline frame is used to embed another document within the current HTML document.
Tip: Use CSS to style the (see example below).
Tip: It is a good practice to always include a title attribute for the . This is used by screen readers to read out what the content of the is.
Browser Support
Attributes
Attribute | Value | Description |
---|---|---|
allow | Specifies a feature policy for the | |
allowfullscreen | true false | Set to true if the can activate fullscreen mode by calling the requestFullscreen() method |
allowpaymentrequest | true false | Set to true if a cross-origin should be allowed to invoke the Payment Request API |
height | pixels | Specifies the height of an . Default height is 150 pixels |
loading | eager lazy | Specifies whether a browser should load an iframe immediately or to defer loading of iframes until some conditions are met |
name | text | Specifies the name of an |
referrerpolicy | no-referrer no-referrer-when-downgrade origin origin-when-cross-origin same-origin strict-origin-when-cross-origin unsafe-url | Specifies which referrer information to send when fetching the iframe |
sandbox | allow-forms allow-pointer-lock allow-popups allow-same-origin allow-scripts allow-top-navigation | Enables an extra set of restrictions for the content in an |
src | URL | Specifies the address of the document to embed in the |
srcdoc | HTML_code | Specifies the HTML content of the page to show in the |
width | pixels | Specifies the width of an . Default width is 300 pixels |
HTML Iframes
An HTML iframe is used to display a web page within a web page.
HTML Iframe Syntax
The HTML tag specifies an inline frame.
An inline frame is used to embed another document within the current HTML document.