HTML Iframes
HTML iframes are used for displaying a webpage in a rectangular region within a webpage. It is represented by <iframe> tag. It can be displayed anywhere in the page.
Example:
Here src attribute is used as the url of the webpage which is displayed within the iframe.
The width and height Attribute
These attributes are used to define the size of the iframe.
Example:
By default width and height are measured in pixel but you can use percentage also.
Example:
Use of border Property
By default, there is a border around iframe. Using the border property you can remove the border.
Example:
You can also change the color and style of the border using border property.
Example:
Use of target Attribute
You can use an iframe as a target frame for a link. For this the the value of the target attribute must match with the value of name attribute. The target attribute is used into the iframe tag and the name attribute is used into the link.
Example:
<p><a href="www.CSEtoppers.com" target="linked_page"> CSEtoppers.com </a></p>
Run Example