8.4. A Word About Frames

Previous versions of HTML supported a flexible, multipane scheme called frames. Frames enable a user agent window to be divided into defined areas, each capable of displaying different content that can be set to scroll independently from one another.

XHTML allows a special document type definition (DTD) for frame support, the Extensible HTML version 1.0 Frameset DTD, available at http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd.

There is no frameset DTD for XHTML 1.1.

Although once very popular with Web designers, frames have become an outdated construct and should not be used for the following reasons:

  • Frames are hard to code (requiring a special frameset document in addition to content documents) and are reasonably hard to manage.

  • Frame support in user agents cannot be relied on as the Web moves to more resource-constrained platforms (mostly in the mobile arena).

  • Frames are going the route of deprecation and aren't XHTML 1.1 compliant.

Get Web Standards Programmer's Reference: HTML, CSS, JavaScript®, Perl, Python®, and PHP now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.