Last Updated on April 26, 2023 by Roshan Parihar
Learn how to embed another web document to the current web document using HTML iframes tag. You can add another webpage but cannot change or modify CSS. The iframes are often used by many online advertising companies to create ads.
Syntax
1 2 3 |
<iframe src="target url"> An alternate text to show, when the browser does not support iframes. </iframe> |
Example
1 2 3 |
<iframe src="html-formatting" width="100%" height="200"> Browser does not support iframes </iframe> |
Output
List of attributes of HTML iframes tag
Sr. No. | iframes attributes | Description |
---|---|---|
1 | src | Used to give the target url of webpage to show on the given web page. |
2 | width | |
3 | height | |
4 | name | Used to give the name of iframe. |
5 | frameborder | Used to give border of the iframe. |
Resources and References
1. W3C Specification.
2. HTML living standard
3. W3C project using Github