All TalkersCode Topics

Follow TalkersCode On Social Media

devloprr.com - A Social Media Network for developers Join Now ➔

HTML Iframes

You can display a webpage in another webpage by the help of an iframe.

iframe is defined by <iframe></iframe>.


Example of iframe

<html>
<body>
<iframe src="html.php" width="500" height="300"></iframe>
</body>
</html>

Result of the above Example



Attributes of iframe


  • src:is the file name that is going to be loaded in iframe.

  • name:is used to indentify the iframe.

  • frameborder:is used to show border of iframe.It can take "1" as a value to show border or "0" to hide border.

  • marginheight:is used to specify the height of the space between the left and right of the frame's borders and the frame's content(eg.marginheight="20")

  • marginwidth:is used to specify the width of the space between the left and right of the frame's borders and the frame's content(eg.marginwidth="20")

  • scrolling:is used to scroll the iframe.It takes values "yes" to scroll the iframe,"no" not scroll the iframe and "auto" to automatically do scroll or do not scroll as per the requirement.

  • noresize:To prevent the iframe from resizing (eg.resize="noresize").

❮ PreviousNext ❯