Since their introduction in Netscape 2.0, the HTML Frames construct has been controversial. A substantial body of informed opinion takes the view that Frames are inappropriate to HTML, and should not be used. Nevertheless, they are widely supported by browsers, and used by many authors.
The approach of standards bodies to Frames has been ambivalent: the W3C addresses the issue by providing separate DTDs for "normal" and Frameset documents. The ISO/IEC HTML standard simply excludes Frames altogether.
The current W3C Standards HTML 4.01 and XHTML 1.0 are each based on three separate DTDs:
In this author's view, the W3C approach is misguided, at least at a technical level. The use of a separate Frameset DTD is unnecessary, and appears to introduce confusion in the minds of authors. And - rightly or wrongly - the W3C DTDs do not permit the adoption of Strict HTML within a frameset.
If we accept that, however imperfectly, Framesets serve a valid purpose, then we should support them. And if we accept them, we should treat them as any other HTML element, with regard to both current browser support and best practice.
It may come as a surprise to some readers to see the WDG supporting Frames. So we should preface this discussion by warning of the serious problems that can and frequently do arise with Frames pages, as discussed in our Guide to frames usage.
The purpose of the WDG DTD is to promote accessibility. One of the main problems with Frames is that they may severely damage accessibility, even for users of mainstream graphical browsers such as those of Netscape and Microsoft. We have therefore reviewed the Frameset model and produced a DTD that will draw authors' attention to accessibility issues while maintaining compatibility with current browser practice and W3C standards.
For browsers and HTML authors, our Frameset model is essentially the same as the W3C's except as detailed below. However, in contrast to the W3C, the WDG DTD integrates framesets with the rest of HTML. So when using the WDG DTD, you only have one DOCTYPE declaration to worry about.
Since the basis for the WDG DTD is W3C's "strict" DTD, the legacy of mid-1990s presentational markup is disallowed. Authors should use stylesheets (CSS) to determine the presentation of HTML pages.
NOFRAMES
required.The <NOFRAMES> element is essential to any reasonably sane
Frameset page. We enforce this by making it a required element.
The content for NOFRAMES
is
BODY
.
BASE
relaxed.The BASE
element has been relaxed by
making the HREF
attribute optional, so
that
<base target="some_frame">
is legal for Frames support. This is already widespread practice.
NORESIZE
and
SCROLLING
attributes disallowed.These attributes serve no useful purpose at all, and are extremely harmful to accessibility, even on "mainstream" graphical browsers such as those of Netscape and Microsoft. We have no hesitation in disallowing them.
TITLE
attribute requiredThe TITLE
attribute is required for
every frame, to encourage authors to use descriptive titles that readers
can select.