HTML <iframe>
query_builder | Christopher PisaniThe HTML element <iframe> which stands for Inline Frame, is used to embed another HTML document in the same document. A callback can be inserted within the iframe element for browsers that do not support the iframe, example : Your browser does not support iframes..
<style>
iframe {
border: 1px solid black;
width: 100%;
}
.output {
background: #eee;
}
</style>
<iframe
title="Inline Frame Example"
width="300"
height="200"
src="https://www.jazzo.co.uk">
</iframe>
<!-- Passing text to the iframe example -->
<iframe srcdoc="<p style='color:red;'>Hello world!</p>" src="/pages/examples.html">
<p>Your browser does not support iframes.</p>
</iframe>
Available Attributes
Attribute | Values | Functionality |
---|---|---|
height | numeric value | Numeric value in pixels to define the height |
width | numeric value | Numeric value in pixels to define the width |
src | filename | The document source file link |
name | text | The name of the iframe |
sandbox | allow-forms allow-pointer-lock allow-popups allow-same-origin allow-scripts allow-top-navigation |
Specifies a set of rules in the iframe |
srcdoc | text | Sends data to the iframe |