iframe - (www.CUNY.edu).
Download
Report
Transcript iframe - (www.CUNY.edu).
iframe
1
iframe
What is iframe?
o An iframe is displayed as a small floating frame
(separate box or window) within a Web page
o Also known as inline frame
The inline frame can be placed within a Web
page in much the same way as an inline image
2
An example inline frame
3
iframe Syntax
The syntax for a floating frame is:
<iframe src=“url”>
alternate content for browsers which do not
support iframe
</iframe>
URL is the name and location of the file you want to
display in the floating frame
The alternate content is the content you want
displayed in the browser that don’t support inline
frames
4
Try iframe
Download main.html and nav.html from class website
Plug in nav.html as an inline frame into main.html
5
Attributes of inline Frames
6
Embedding contents in iframe
What can be displayed in an inline frame?
o Of course html file
o But what else?
Image
o (in fact many of the websites these days use iframe to display
their logo instead of the entire header frame)
Pdf
o Not very attractive though for the viewers because of the small
size of the iframe
o However, you can increase the size of the iframe
Embedded video
o One of the most popular usage of iframe
o Used extensively these days in news websites
Have fun with iframe features
7