32

What is the purpose of the iframe tag in HTML? What is it used for?

Lajos Arpad
  • 53,986
  • 28
  • 88
  • 159
jagan j
  • 345
  • 1
  • 3
  • 5

2 Answers2

15

An <iframe> is used for containing (X)HTML documents in other (X)HTML documents. This enables updates of parts of a website while the user browses, without making them reload the whole thing. (This is now largely replaced by AJAX).

Also, see:

http://w3schools.com/TAGS/tag_iframe.asp

http://en.wikipedia.org/wiki/HTML_element#Frames

Moshe
  • 56,717
  • 76
  • 267
  • 423
Lasse Espeholt
  • 17,432
  • 5
  • 61
  • 99
6

Be careful. <iframe> tags are becoming less common.

I wouldn't use iframes except in really specific cases, because it is nonstandard.

here is the link

However, Google images still uses <iframe> tags.

MNasir
  • 137
  • 7
charly
  • 956
  • 13
  • 22