80 likes | 121 Views
iframe. iframe. What is iframe? An iframe is displayed as a small floating frame (separate box or window) within a Web page Also known as inline frame The inline frame can be placed within a Web page in much the same way as an inline image. An example inline frame. iframe Syntax.
E N D
iframe • What is iframe? • An iframe is displayed as a small floating frame (separate box or window) within a Web page • Also known as inline frame • The inline frame can be placed within a Web page in much the same way as an inline image
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
Try iframe Download main.html and nav.html from class website Plug in nav.html as an inline frame into main.html
Embedding contents in iframe Have fun with iframe features • What can be displayed in an inline frame? • Of course html file • But what else? • Image • (in fact many of the websites these days use iframe to display their logo instead of the entire header frame) • Pdf • Not very attractive though for the viewers because of the small size of the iframe • However, you can increase the size of the iframe • Embedded video • One of the most popular usage of iframe • Used extensively these days in news websites