Section 14.5. Frame Design Tips and Tricks


14.5. Frame Design Tips and Tricks

Perhaps the most common bit of design advice regarding frames is "don't use them." Although frames once had their heyday, they are no longer used in professional, standards-driven web design.

If you do choose to use frames for a project, there are a few pointers and tricks you should be aware of that go beyond a simple familiarity with the elements and attributes.

14.5.1. All-Purpose Pages

Designing a web page to be part of a framed document doesn't guarantee that it will always be viewed that way. Keep in mind that some users might end up looking at one of your pages on its own, out of the context of its frameset (this is possible if a search engine returns the URL of the content, for example). Since frames are often used for navigation, this orphaned content page could be a dead end for a user.

For that reason, you should try to design your content pages so that they stand up on their own. Adding a small amount of redundant information to the bottom of each page can make a big difference in usability. First, indicate the name of the site with a link to its home page on each content document. This helps to orient a newcomer who may have just dropped in from a search engine.

It is important to pay particular attention to the navigational options available on content pages viewed without their frameset. At the very least, provide a small link on every page to a more appropriate (and framed) starting point, such as the top level of your site. Be sure to set the target="_top" attribute so the link won't load the home page frameset within the current frameset.

14.5.2. External Links

By default, any link within a frame loads the new document into that same frame. To prevent external links from loading into the current frame, be sure to add target="_top" to all your external links; the new site will open in the full browser window. As an alternative, set the target to "_blank" to open the link in a new browser window.

As noted earlier, always provide a note or some indication that a link is going to open in a new window so as not to confuse your users.


It is never appropriate to load whole external sites into the context of another framed document, unless you are doing so with the expressed permission of the owners and operators of the external site.

14.5.3. Improving Frame Accessibility

Framed content, while accessible to screen readers, may be disorienting. The content may be read from each frame in a linear fashion (users may skip to each frame with a keyboard shortcut) or it may be presented as a list of links to the individual HTML documents.

There are a few measures you can take to improve the accessibility of your site.

14.5.3.1. Give frames titles

One of the best ways to make framed content easier to use for visitors with alternative browsing devices is to give each frame a short but descriptive title using the title attribute in the frame element, as shown here:

     <frame src="/books/4/439/1/html/2/navigation.html" title="navigation options"  name="links" />     <frame src="/books/4/439/1/html/2/welcome.html" title="main content" name="main" /> 

Users can use the titles to decide whether to access that frame. In the absence of titles, the name attribute may be used, but authors typically give frames names that are minimal and not adequately descriptive.

14.5.3.2. Provide complete noframes content

Framesets should always include a noframes element to provide content if the user cannot or chooses not to view the framed content. It is a good idea to make the complete content from the framed page available in the noframes element and to enclose it in the body element. At the very least, the noframes content should be as descriptive as possible rather than just "you need frames to see this site."

Adding links to the individual HTML documents, particularly those containing links to the other parts of your site, helps users get to your content without relying on the frameset.

14.5.4. Helping Search Engines

Search engines all work differently but pretty much uniformly do not understand frames or any content within a frameset or frame element. This means search engines will not find any links that require burrowing through a site for indexing purposes, and all the content of your framed site will be missed.

The same measures for improving accessibility for users with non-visual browsing devices (i.e., providing frame titles and complete noframes content) will also make it easier for search engines to index your content.

In addition, you may include a meta element with information about your site in the frameset document. Although not all search engines use meta information, meta elements can be useful tools for those that do. If your top-level frameset document contains limited noframes content, you can use the meta element to add a site description and keywords to the page for the search engine to index. Values for the meta element related to search engines are provided in Chapter 9.

For more information about search engines and how they work, see the Search Engine Watch site at www.searchenginewatch.com (from which the previous information was gathered).

For information on how MSN TV handles frames, see developer.msntv.com/Develop/Frames.asp.





Web Design in a Nutshell
Web Design in a Nutshell: A Desktop Quick Reference (In a Nutshell (OReilly))
ISBN: 0596009879
EAN: 2147483647
Year: 2006
Pages: 325

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net