An iframe stands for the inline frame. This is used to display internal or external webpage within the webpage.
src
represents the URL of the webpage that is to embed.
- URL
name
represents the name of an iframe
- text
sandbox
represents extra restrictions for the content in an iframe.
- allow-forms - allows to submit a form
- allow-orientation-lock - allows lock screen to move within a definite position.
- allow-pointer-lock - allows the use of Pointer Lock API.
- allow-popups - allows popup of the window.
- allow-presentation - allows starting a presentation session.
- allow-same-origin - allows the content of the iframe to be in the same origin.
- allow-scripts - allows running script.
- allow-top-navigation - allows the content of the iframe navigates from the top level of the browsing context.
srcdoc
represents the HTML content of the page to show in the iframe.
- HTML_code
width
the width of the iframe.
- pixels
height
the height of the iframe.
- Pixels
HTML Button Example:
Edit Example