<iframe> Element

Allows the browser to display another web page document within the current document.


<iframe src="URL"></iframe>


Attribute Description Value
src Specifies URL for image “https://www.site.com” or relative URL “/nextpage.php
name Specifies the name of the iframe User defined text
width Specifies the width User defined number of pixels, e.g. 400px, or % screen e.g. 50%
height Specifies the height User defined number of pixels, e.g. 400px
frameborder Specifies to display a border around the iframe 0 or 1
class Specifies the class name to be used for CSS styling User defined class name
id Specifies the unique id for CSS or Scripts User defined unique text id
longdesc Specifies a separate page that contains a long description “https://www.site.com/description.php” or relative URL “/description.php"
scrolling Specifies whether scrollbars should be used yes, no, auto



An iframe can be used as the target frame for a link by setting the target attribute of the link to the name attribute of the iframe:

Leave a Reply