Click to See Complete Forum and Search --> : Iframe


Dark Dragon
05-28-2003, 07:15 PM
Okay..I have a seemingly dumb question to ask but...what is an Iframe? :confused:

Charles
05-28-2003, 07:48 PM
True enough, that is indeed a seemingly dumb question, for the only dumb question is the one unasked. And the answer to this and all HTML questions can be found at http://www.w3.org/TR/html4/. More especially and in this case see http://www.w3.org/TR/html4/present/frames.html#edef-IFRAME. The IFRAME element is used to indicate an inline frame or an inline subwindow. You can also use the OBJECT element (http://www.w3.org/TR/html4/struct/objects.html#edef-OBJECT) but after four years support is still a little iffy.

And note, there is a proper way to use the IFRAME element. Some types of browsers do not support inline frames so you need to provide a link to the resource. But you can do it in a way that only the people who need the link will know about it. Id est:

<iframe src="http://www.w3c.org/"><a href="http://www.w3c.org">W3C</a></iframe>

Note also that you will need to use the transitional DTD to use the IFRAME element.

Dark Dragon
05-28-2003, 07:52 PM
*sighs*:o

Sorry but I don't know what a transitional DTD, inline or outline frame/window is..my college did a less than horrible job instructing us.

Charles
05-28-2003, 09:05 PM
Inline is counterposed to block, not outline. Block level elements are things like the H elements and the P element. They can be thought of as the elements that come with a hard return on visual browsers. Cut and paste this snippet of markup and you'll know what an inline frame is: <iframe src="http://www.w3c.org/"><a href="http://www.w3c.org">W3C</a></iframe>

When the W3C (http://www.w3.org) took over running the internet from the IETF (http://www.ietf.org/) HTML was in a terrible state. We were in the midst of the browser wars and nobody was writing pages that worked on Braille or audio browsers. The IETF version of HTML became HTML 2 (http://www.w3.org/MarkUp/html-spec/html-pubtext.html. HTML 3.2 (http://www.w3.org/TR/REC-html32) was published in January of 1997 and was a description of how graphical browsers worked at the time. Sadly, it is what most web authors think of as HTML. To this day, HTML 3.2 will work on all graphical browsers, but not on non-graphical browsers. In December of 1997 they published HTML 4.0 which described how browsers should work. It went through a few changes and now we have HTML 4.01 (http://www.w3.org/TR/html401/). HTML 4.01 got rid of anything that related to presentation in favor of CSS. A page written in HTML 4.01 will work on any browser that there is, but when it came out CSS support was spotty enough that they provided a "transitional" version. The idea was that you would start with a 4.01 page that worked on all browsers and then add the stuff from 3.2 that made it look nice of version 4 browsers. The problem is that web authors are still using the transitional DTD to simply do whatever they like. There are times, however, that you have still have to use it because browsers still haven't caught up.

That said, you need to start by reading the 3.2 specification. A lot of stuff there proved to be a bad idea but it is still a good introduction. Then you need to quickly start reading the 4.01 spec. And do it before the 3.2 has any time to influence you. You need to read the 4.01 from start to finish, but you aren't going to do so. You'll find that each section starts with a formal definition of each element that will make no sense whatsoever unless you read the first part of he spec. Just ignore that block, it's simply a summary of what follows.