0% found this document useful (0 votes)
24 views9 pages

Lab Lec9

The document discusses HTML iframes. It explains that iframes are used to embed other documents within an HTML document. It provides examples of how to specify the size of an iframe using height and width attributes, remove the border of an iframe using CSS, and target an iframe for links using the target attribute.

Uploaded by

Haidar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views9 pages

Lab Lec9

The document discusses HTML iframes. It explains that iframes are used to embed other documents within an HTML document. It provides examples of how to specify the size of an iframe using height and width attributes, remove the border of an iframe using CSS, and target an iframe for links using the target attribute.

Uploaded by

Haidar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 9

Frames

Frames
 The HTML <iframe> tag specifies an inline
frame.
 An inline frame is used to embed another

document within the current HTML document.


 Use the height and width attributes to specify
the size of the iframe.
 The height and width are specified in pixels

by default
 <html>
 <body>

 <h2>HTML frames</h2>
 <p>You can use the height and width attributes to
specify the size of the iframe:</p>

 <iframe src="demo_iframe.htm" height="200"


width="300" title="Iframe Example"></iframe>

 </body>
 </html
 By default, an iframe has a border around it.
 To remove the border, add the style attribute

and use the CSS border property


 <html>
 <body>

 <h2>Remove the Iframe Border</h2>


 <p>To remove the default border :</p>

 <iframe src="demo_iframe.htm" style="border:none;"


title="Iframe Example"></iframe>

 </body>
 </html>
 An iframe can be used as the target frame for
a link.
 The target attribute of the link must refer to

the name attribute of the iframe


 <html>
 <body>

 <h2> Target for a Link</h2>

 <iframe src="demo_iframe.html" name="iframe_a" height="300px"


width="100%" title="Iframe Example"></iframe>

 <p><a href="https://www.detail.com"
target="iframe_a">detail.com</a></p>

 <p>When the target attribute of a link matches the name of an iframe, the
link will open in the iframe.</p>

 </body>
 </html>
 Thank You

You might also like