How to Use the HTML iframe Tag with Examples
Syntax
Syntax of HTML <iframe> tag
<iframe src="URL">
..
.
</iframe>
- <iframe> tag in HTML use to embed another webpage or external content inside webpage.
- HTML <iframe> tag inline frame tag.
- HTML <iframe> tag allows display separate html page small window on your current page.
- HTML <iframe> tag embed example :- YouTube videos, Ads, webpages, Twitter, TikTok video, Pinterest Pin ,Facebook
How to Use the HTML iframe Tag with Examples
Example
<!DOCTYPE html>
<html>
<body>
<iframe src="https://webdesigningtheory.blogspot.com"
</iframe>
</body>
</html>
How to Use the HTML iframe Tag with Examples
Explain Program
Step 1]
<!DOCTYPE html>
- This declare the document type.
- browser that the document is written in html
Step 2 ]
<html>.... . </html>
- html is the root element of the html page.
- Every thing inside it is part of the webpage.
Step 3]
<head>
<title> HTML iframe tag </title>
</head>
- <head> section
- head section contains metadata about page. not visible on the page itself.
- <title> tag title section set the title of the page shows the browser tab.
Step 4]
<body>
- < body> tag contains all the content visible to webpage.
- <body> tag contains all the visible content of the page.
- inside <body> show the browser screen.
Step 5]
<h1> webdesigningtheory.blogspot.com</h1>
<h2> learn HTML iframe tag</h2>
- <h1> tag heading tag use for main title on webpage .
- <h2> tag subheading of page.
Step 6]
<iframe src="https://webdesigningtheory.blogspot.com"
title="Web designing theory free online blogspot web Tutorial ">
</iframe>
- <iframe>.....</iframe>
- The iframe tag is use to embed another webpage inside webpage.
- title :- provides text description of iframe content.
- helps seo browser understanding.
Step 7]
closing the Tag
</body>
</html>
