What are the differences between Div and IFrame?

Goliathstwin

New member
Joined
Mar 21, 2015
Messages
27
Points
0
My HTML skills are being improved day by day by I am learning it recent weeks, just a thing making me stuck is distinguish the differences between Div and IFrame when using it in html file? when should I use Div and IFrame? Can any one explain me?
 

EnricTellez

New member
Joined
Dec 19, 2016
Messages
27
Points
0
a div is just a block which you can fill with stuff like p tags or images.
an iframe is something thats loaded on a different server but displays on your page.

like for example you want to show a google maps thing on your page, you use an iframe so you get the information from googles server.
iframes are really cool, you will likelly use them a lot. :)
 
Last edited:

Mike001

New member
Joined
Apr 27, 2016
Messages
578
Points
0
Let me give you a developers explanation of the difference between a DIV and an iFrame.

When we place a DIV (division) in an HTML document it is meant to be used as a container for HTML elements. A DIV resides in the same window as the body element. It is normally used to separate content for placement and styling. It is not unusual to have div elements nested inside other div elements to allow for very specific styling and browser window placement. Div elements are block level elements in HTML.

An iFrame is meant to load information into your browser window from another sites pages. For instance incorporating a Google Map into the browser window of your site would normally be placed in an iFrame. An iFrame will act as a child element to the main page it resides on. iFrames are inline elements in HTML.

I hope this helps explain the difference between the two elements.
 
Older threads
Replies
2
Views
5,195
Replies
9
Views
2,124
Replies
27
Views
4,674
Replies
14
Views
2,323
Newer threads
Replies
8
Views
1,876
Replies
1
Views
1,147
Replies
12
Views
2,057
Replies
7
Views
1,422
Latest threads
  • Deleted
  • Deleted by Rob Whisonant
Replies
0
Views
2
  • Deleted
  • Deleted by Rob Whisonant
Replies
0
Views
1
Replies
4
Views
42
Replies
1
Views
25
Replies
3
Views
84
Recommended threads

Latest postsNew threads

Referral contests

Referral link for :

Sponsors

Latest Blog ArticlesMost Viewed Threads

Popular tags

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top