O'Reilly logo

HTML & XHTML: The Definitive Guide, 6th Edition by Bill Kennedy, Chuck Musciano

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

XFrames

Frames are a rags-to-riches success story. From a nonstandard extension in the Netscape browser to a standard component of HTML and XHTML, frames have proven themselves as a core element of the HTML world. Nonetheless, there are problems with frames that have never been fully resolved:

  • Navigation with a browser’s Back button can be unpredictable.

  • You cannot directly reference a document within a frameset.

  • You cannot reference a particular collection of frames with a single URL.

  • Search engines often do not follow framed content.

To correct these deficiencies while retaining the power of frames, the World Wide Web Consortium (W3C) has proposed a slightly different model for framed content. This model is still a working document, and has not yet been implemented in any browser. Still, we briefly describe it here to make authors aware of what they might expect from frames in the near future.

An XFrames Document

Within HTML and XHTML, frames replace the <body> of a document, leaving the <html> and <head> tags intact. In the XFrames model, an XFrames document replaces the entire <html> document, carrying with it its own <head> and framed content. Within the <head> tag, authors can provide a <title> and <style> tags; the framed content is then denoted within <group> and <frame> tags. A short XFrames document might look like this:

<frames xmlns="http://www.w3.org/2002/06/xframes/"> <head> <title>Kumquat Lore</title> <style type="text/css"> #header {height: 10em } #toc, #nav {width: 20%} ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required