How to specify the address of the document to embed in the iframe element in HTML5?
The iframe in HTML stands for Inline frame. The “iframe” element in a webpage helps to display another web page document within some particular area or region using the web browser. The inline frame is used to embed another webpage within the current HTML webpage having different attributes for loading, setting height or width, allowing full screen mode, src, and many more.
Approach: The task is to define an address of the document embedded in an iframe element. The task can be done by simply using the src attribute of the iframe tag in the document. This property is used to specify the URL of the document that is embedded to the <iframe> element.
Example: Below code illustrates the use of the src attribute in the <iframe> element.
Example 2: The below code uses the iframe element without the scrollbar and frameborder using the respective iframe attributes. The attributes are “scrolling=no” and “frameborder=0” as shown in the example.