HTML Iframe

Iframes are used to embed another webpage on your website.

HTML Iframe Definition

Iframes are commonly used to seamlessly integrate content from different sources into a single webpage while maintaining isolation between the embedded content and the host page. Maps, films, ads, social network feeds, and other forms of external material are frequently shown via them.

Syntax

<iframe src="URL_OF_THE_CONTENT" width="WIDTH" height="HEIGHT" frameborder="FRAMEBORDER"></iframe>
HTML

Let me break down the attributes for you:

  • "src“: This attribute specifies the URL of the content you want to embed within the iframe. Replace “URL_OF_THE_CONTENT” with the actual URL.
  • width“: This attribute sets the width of the iframe in pixels or as a percentage of the parent container’s width. Replace “WIDTH” with the desired width value.
  • height": This attribute sets the height of the iframe in pixels or as a percentage of the parent container’s height. Replace “HEIGHT” with the desired height value.
  • “frameborder”: This attribute determines whether a border should be displayed around the iframe. Use “0” to hide the border and “1” to display it. Replace “FRAMEBORDER” with either “0” or “1”.

Example

<!DOCTYPE html>
<html>
<head>
    <title>Embedded Content Example</title>
</head>
<body>
    <h1>Welcome to Technalay</h1>
    <p>Learn in Hindi</p>
    <iframe src="https://technalay.in/" width="700" height="400" frameborder="0"></iframe>
</body>
</html>
HTML

Preview

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *