7.  How can I keep my Web pages robust?


Return to Appendix V  Return to Table of Contents



Section Summary




What makes web pages fragile?

In a nutshell, Web pages will break if they contain tags that the browser doesn't understand, or if they have been composed with unjustified assumptions about the browser, its configuration, or the hardware it is running on. This section discusses the methods you can use to avoid creating fragile Web pages.

A very convenient feature of HTML is that browsers will ignore tags that they don't understand. This means that it is easy to predict what all older browsers will do in the presence of a new tag, so that it is possible to make correct decisions about whether, and how, to use new tags.

As you browse the Web with a modern graphical browser, you will see many pretty pages, whose authors have done things you will be tempted to emulate. In many cases, however, you will find that you must make a compromise between page designs that are pretty on some browsers, but fragile (and therefore ugly or non-functional on other browsers), and robust page designs whose appearance may be more "sturdy and functional" than "elegant." Often you will find that for a comparable or only slightly greater initial effort, it will be possible to create page designs that are both robust and elegant.

As you make your choices about the design of your pages, you should keep clearly in mind the user population you expect to be serving; for example:

Additional information on the demographic characteristics of a large population of Web surfers and their hardware and software can be found on-line at the Georgia Tech survey page; look particularly at the most recent survey.



How can I avoid making my pages fragile?

The methods that you should use to avoid making your pages fragile depend on the technique you use to create and modify your HTML files:



Where else can I find information about robust page design?



What Web page characteristics should I use?


  1. Choose a good title for your page: the page itself won't be fragile without a title, but having a good one will make it easier for people to find your page using search engines. Most browsers display the title at the top of the screen, and use it for the visible label for any bookmark set to that page.

    The title should be reasonably terse, descriptive of the contents, with neither acronyms nor obscure abbreviations, and unique (at least among all the pages controlled by that author). It is often a good idea to include the organization's name for official pages. It is both trite and also redundant with its own existence to use the phrase "home page" in either the title of the Web page, or in the first header in the body of the page.

    Often, but not always, it will be sensible to choose identical text for the TITLE and for the first-level header at the top of the document, or for the displayed text of a banner graphic at the top of the document.


  2. Always specify an image's height, and width, and ALT text.

    The height and width specification will speed up display of your page, because the browser can continue to lay out the text without waiting for the image file to be returned by the server.

    The ALT text should be specified on every image, so that Lynx users (and graphical browser users with image loading turned off) are informed (if there is text) or not distracted by the default "[image]" text (which will be suppressed by having an empty string or space character for the ALT text, as opposed to having no ALT text at all).


  3. Use server-side imagemaps. Many people are still using graphical browsers that know how to do server-side imagemaps, but cannot do client-side imagemaps.

    Server-side imagemap support is, by definition, server-specific. Most servers are configured to use either CERN or NCSA format for the imagemap data file. Consult with the system manager of your server to learn how it should be done. You might also want to take a look at the on-line documentation we provide for Ohio University Web authors, for a discussion of methods to use server-side imagemaps. That discussion includes step-by-step instructions for preparing the imagemap data files in either CERN or NCSA format.


  4. Link to existing resources, instead of re-inventing the Web.

    • Do not re-create information that duplicates information provided by others.

    • Do not re-type anything that is already being published.

    If you type in information that others are responsible for knowing as part of their job, then your pages will not start out broken, but they will be out of date sooner, more often, and for longer times. One of the daunting aspects of the world wide web is the responsibility for revising and updating all that information. In cases where there is a department within the University (e.g., Registrar's Office, Graphic Communications) that is responsible for hardcopy publication of information you want to have on-line, please contact that department to make arrangements for on-line publication.

    As each University gets started with the Web, there will be situations where people want information to be on-line that the responsible party is not yet prepared to place on-line. When that happens, it is usually a good idea to contact the people responsible for the University's home page, so that they can coordinate the various projects that are in progress.

    By working with the party responsible for the information that you want to have linked with yours, you can ensure that the proper tags are inserted in the on-line version of their documents, too.


  5. Use list structures whenever the document's contents are in fact a list, including nested lists to create an outline-style format.

    Using lists for a set of links, rather than embedding those links in a paragraph, has the advantage that Lynx users will be encouraged to use the down arrow key to get from one item to the next, the correct method. If the items are embedded in a paragraph, a Lynx user might type, for example, the right arrow, which will take them into the current link, rather than moving over to the next link. The list format therefore helps to avoid frustrating your reader!

    Feel free to put break, paragraph, or horizontal rule separators between list items to force extra white space. Unlike with paper publications, it does not cost anything extra!


  6. Each home page should provide shortcuts for the reader to go to all of the primary links without having to scroll down. This avoids forcing your reader to scroll and scroll down through your whole page in order to find the link to the next page he or she wants to examine. There are two suggested methods:

    • A set of terse text links near the top, such as can be found here or on the Academic Technology home page.

      When using this approach your readers will appreciate having extra white space, which makes mouse pointing seem less challenging, so use a paragraph break between lines to increase the vertical separation, and on each line use "  " (which forces two non-breaking spaces) between each pair of items, in order to increase the horizontal separation between items.

    • A set of small graphic buttons near the top, such as can be found here or on the Ohio University Webauthors Welcome Page.

      If there are only a few destinations, you can use a separate graphic for each, whose ALT strings will provide the identification for Lynx users. If there are more than a half-dozen destinations, then use an imagemap with a single graphic file, and create a separate text.htm file for Lynx users unless there are also text based links to those destinations in the body of your page.

    In each of these, the link from the shortcut text or graphic is directly to the location of interest.

    With either form of shortcuts, a single "larger" graphic is appropriate on the top part of the first screenful of a home page. Such a graphic should be at most 520 pixels wide and at most 200 pixels high, preferably between 450 and 470 wide and approximately 125 high. The limitation on width is in order to be able to see the entire graphic on the default window width of Macintosh Netscape, and for the entire graphic to be printed with the page. The limitation on height is to ensure that as many as possible of the shortcut links will be visible on the first screen of the page, even by people using the old standard VGA (640 x 480-pixel) display. Example graphics include:

    • Photograph of person, building, or campus scene
    • Illustration (technical or historic)
    • Institution or department Logo
    • University Seal

    This banner graphic and the shortcut button array graphic should be designed together. They do not have to be of the same width, but the aesthetics of the combination should be considered, rather than creating them independently.


  7. In general, either the home page or a page linked directly from it should include full contact information, including telephone numbers and postal mailing address. This is especially an issue for departmental pages, but should be considered also for personal pages.


  8. Use informative text for links, rather than "Go Back" or "Return," because people may get to your page from a search engine, or by following a link on someone else's page.


  9. Exercise care when choosing fonts for text within graphic images:

    • Smaller font sizes (12 point and below, for sure) should be sans-serif;

    • Medium and larger font sizes (20 points and up, for sure) should be anti-aliased;

    • Readability may be enhanced, especially for smaller font sizes, by adding a drop-shadow for the lettering. If so, it should be blurred with a radius of two or three pixels, and shifted one or two pixels. For example:

      • With drop shadow: graphic images

      • Without drop shadow: graphic images

    • If your institution has chosen particular fonts for particular settings in hardcopy publications, you should consider using the same fonts in the corresponding settings in your Web publications.


  10. Any anchor tags for sending E-mail (so-called "mailto:" links) should specify a single destination address to send the message. Using mailto links with multiple addresses in one link (to send the message to multiple people at once) has been observed to crash Lynx. This obviously prevents Lynx users from seeing your page and also prevents your pages from being included in any keyword searchable index that is created using Lynx as the "crawler."



What Web page characteristics should I avoid?


  1. Avoid using HTML Tables. The table tags are ignored by earlier versions of Lynx and MOSAIC, for example. The usual result is an unreadable re-wrapping of the text contents of the entire table into one paragraph.

    Because they ignore the various Table tags, non-table-aware browsers are only likely to do something readable with a single-row table, especially if the first item within each cell is tagged as a header. For partially table-aware browsers, such as the latest version of Lynx, you should experiment and see how it works.

    A tabular presentation can also be achieved by using pre-formatted text. Remember to keep each line to at most 80 displayed characters (not including any embedded tags), so that it will be displayable in Lynx.

    Beware using STRONG format or HEADERS within pre-formatted text: most browsers display strong formatted text and headers by using bold-face, but each bold-face character is wider than the corresponding plain character, destroying the intended column alignment.

    Beware setting background colors for individual table cells. Version 2 of Netscape ignores table cell background colors, but does obey BODY attributes for text and link colors, as well as FONT color tags, including those within cells. It is therefore quite easy to create a table that looks very nice in later versions of Netscape, but in which the text is impossible to read using Netscape Version 2, because the text and background are identical colors.

    Beware using table structures to attempt to control the placement of items on the screen. Such pages are always fragile; they will be broken by having the window set to different dimensions than anticipated.


  2. Avoid using HTML frames. There are multiple reasons to avoid using frames, in spite of the fact that the latest versions of Netscape and of Internet Explorer do reasonable things with them:

    • Because of the RAM required by modern browsers, many people will continue to use earlier versions that do not know about frames.

    • Considerable work is required to set up your Web pages, if you do use frames, such that any revision need be made in only one place - usually you will be maintaining two versions of the information, either in separate files or in two places within one file.

    • A common use of frames is to create a "fixed" table of contents in a narrow frame on the left edge of the screen. The primary frame (which is likely to be the only part visible to non-frame users) will then have the content, without the navigational aids, making it harder to use.

    • Frame-based pages are always fragile, either breaking or at least not producing the intended effect when the browser's window width is outside the range of widths the author designed for.

    • If, despite all of this, you do decide to use frames, be very careful that any links to pages outside of your own are constructed to appear in a full window, frame-free. If not, there is real risk that you will get into an endless recursion of frames-within-frames-within-frames...


  3. Avoid using gratuitous animated images. Animated images are a continuous distraction to your reader, and a continuous drain on system resources (primarily CPU time) on the browsing machine. Furthermore, a significant fraction of the people who will look at your page are using Macintosh Netscape V2, or other browsers that suffer from a "feature" that continually re-writes the animated graphic loading messages in the bottom margin of the window - this both distracts your reader and prevents your reader from being able to use that bottom margin for discovering where the link the mouse is pointing to will go.

    There are situations where animated images are the most appropriate method to convey information (for example, to show the flow of materials in a chemical engineering process). Animated images, where they will work, are less burdensome than a QuickTime movie clip.

    It detracts from a Web page, however, to use an animated image where no animation is necessary.

    Be aware, also, that faster machines are likely to display the animation sequence so suddenly that it is just a blur anyway, and loses all postive impact.

    When your reader prints a page containing an animated image, only one of the sequence of images will be printed, essentially at random, so your page is likely to look lame when printed.


  4. Avoid aligning images to the left or right, to cause text to flow around the image. Such pages are always fragile, either breaking or at least not producing the intended effect when the browser's window width is outside the range of widths the author designed for. In particular, text may be hidden completely or partially by the image if the window is too narrow.


  5. Avoid using short, wide graphics, no matter how pretty, to separate sections of the page. If viewed with a narrow window, they will extend beyond the edge of the display. If viewed with a wide window, they will not run from margin to margin. Horizontal rules can be modified with a variety of attributes to be less mundane, for example:




    Horizontal rules aren't pretty, but they are robust, and robust is better than fragile.


  6. Avoid making page design choices based on looking at the on-screen presentation with one browser. Again, this does not guarantee fragile pages, but it does make it much more likely. Ideally, every page should be critically reviewed from Netscape (versions 2 and 3), Mosaic, Microsoft Internet Explorer (versions 2 and 3), and Lynx, and any other web browser you can readily use. In practice, you will soon learn what constructs to avoid, and therefore you will be able to limit your checking with other browsers. Web page authors should examine their own pages regularly with Lynx and at least one alternate graphical browser. Be especially careful when first using any particular feature of HTML. Many Netscape-specific HTML features look dreadful in other graphical browsers, as well as looking bad in Lynx.

    Lynx is important for several reasons, including:

    • Many people have convenient web access only through Lynx, including students living off-campus at many institutions and people using many freenets.

    • Lynx provides the best browser for use by visually impaired people, since it permits them to take advantage of hardware and software to vocalize the characters on their screen.

    For graphical browsers, this viewing should include consideration of at least the following:

    • Window width

      • Don't count on your readers seeing the full width of any graphic that is more than 460 pixels wide.

      • Printed output, especially on a Macintosh, is likely to clip the right-hand portion off of any graphic that is wider than 520 pixels, regardless of the window width the browser is set for. It is likely also to clip the text content at the same point if table or frame constructs force the width to exceed 520 pixels.

      • Don't count on the display wrapping at any particular width - some browsers will be running on very wide displays (up to 1280 pixels wide), and some will be adjusted to a very narrow window (512 pixels is common, smaller than that is unusual).

      • Using background graphics that are designed with a contrasting region along the left portion of the screen can be problematical. Another copy will be tiled onto the right side of the screen if the browser's window is wider than the graphic. This can easily be distracting, and sometimes makes the page unreadable, because the text on the right portion is specified with a font color that blends with the background that was intended to be displayed only for the left side.

    • The variations in appearance of graphics when the display is set to 256 colors (8-bit), to 16 colors (4-bit), or to monochrome (1-bit).


  7. Avoid trying to control the appearance of text by setting the font, changing its size or color, or making it boldface. Except as noted here, please don't exercise these choices, even though they are provided by newer versions of HTML and will work in recent graphical browsers.

    On the web, unlike hardcopy publishing, type faces are controlled by the browser. Lynx uses fixed-pitch fonts for all text, because Lynx works with displays of 24 rows of 80 characters each. Netscape usually uses two type faces, a proportional-spaced font (usually Times) and a fixed-pitch font (usually Courier). Browsers that don't know about the font or bold tags will ignore them, and the text "marked" with those tags will simply blend in with the surrounding text, instead of being emphasized.


    Background Issues

    • Background graphic images that show pale on your monitor may display so darkly on other machines that your text cannot be read. (This has been observed even with both machines running Netscape!)

    • If you feel you must do something different from the default, you will probably not encounter any nasty surprises by specifying a background color that is paler than the default gray, especially if you go all the way to white, by specifying a color code of #FFFFFF.

      The choice of a white background is especially appropriate for a web page that is to be used as a slide show for a presentation, because it increases contrast, and therefore enhances the readability of the projected display. Beware specifying colors by name (e.g., "darkgreen") instead of by RGB color value (e.g., #006000). Many older graphical browsers are still in use that do not understand the color names.

    • Using a dark background color and white or light-colored text has been observed to result in color inkjet or laser printers producing a completely unreadable rendition of a page that was readable on-screen, or wasting incredible amounts of toner or ink, or both. Many browsers (including, for example, Macintosh Netscape Versions 2 and 3) do not provide any method for ignoring the document's background and text colors just at print time, only as part of the overall configuration.


    Color Issues

    • Individual browsers can be, and often are, configured to ignore the color directions in the HTML files, so you cannot count on your colors being used.

    • Please do not specify any of the TEXT or LINK colors: people become subconsciously attuned to the colors that their browser uses by default. Your reader has been building up an intuitive feel for the meaning of various colors, based on the default behaviour of his or her browser. When you try to override that, you are discarding the reader's intuition. This is so far from being "user friendly" that it deserves to be called not merely "user-hostile," but perhaps even "user vindictive."


    Emphasis Issues

    • Use strong format for emphasis within a paragraph, rather than bold: Lynx and other browsers that don't know about bold tags will ignore them, leaving no emphasis at all!

    • Use the typewriter format and pre-formatted text to force graphical browsers to use a fixed-pitch font. Unlike the rest of your HTML page, pre-formatted text also preserves space characters and line breaks - there is no re-wrapping. We routinely use these codes for display of computer output or input text in user documentation, such as this document.

      Typewriter format will look just the same as the surrounding text when viewed with Lynx or other text-based browsers, so do not use it for emphasis.

    • Use italics very sparingly: italics print very nicely on laser printers at 300 dots per inch, but on-screen italic fonts, displayed at perhaps 75 pixels per inch, are almost invariably hard to read, aren't they? This is especially true of regular-size and small italic fonts; the larger fonts aren't quite so bad, but most people browse the Web with their default font size about as small as they can comfortably read.

      In scholarly work, it is common to format bibliographic citations using italics for certain parts of the text (e.g., the title of a book or journal). It is probably better to conform to that standard style, and be hard to read, than to appear illiterate.

    • Be aware that "ADDRESS" and "CITE" format are rendered in italic by many browsers, so use them very sparingly, if at all.

    • Use underline format very sparingly, if at all: it may create confusion with links.

    • Use the font attribute SIZE=n very sparingly, if at all. If you must use it, be sure to use the "relative size" form, with an explicit "+" or "-" preceding the numerical value, rather than the "absolute size" form with neither positive nor negative sign. The reason to choose relative sizes is to avoid making your page completely unreadable by visually impaired people, who are likely to set the default font size for display to a value corresponding to SIZE=16, or bigger.

      For positive values of n, you should instead use either strong format or header tags (see the next item). Negative values of n are a major readability problem, because most people adjust their browser to display text with a default size that is as small as they can comfortably read on screen, in order to provide the maximum amount of interesting information on the screen at any one time. Even going down one step in font size will make it much harder for many people to read.

    • Use header tags for section titles. Don't use level 5 or level 6 header tags, because they are likely to be displayed on-screen in a tiny, hard-to-read font, made even harder to read by being in boldface.



      Do not use header tags to emphasize a whole paragraph, use strong format if you must, but it is even better to use some other technique to make a whole paragraph special. (This paragraph, for example, is preceded and followed by horizontal rules, and those horizontal rules are included, along with the paragraph, in a blockquote section.) See also the next point.



    • DO NOT TRY TO EMPHASIZE LARGE BLOCKS OF TEXT BY PUTTING THEM IN BOLD OR STRONG FORMAT OR ALL IN UPPERCASE. IT MAKES YOUR READER FEEL LIKE YOU ARE SHOUTING, DOESN'T IT?

      Sometimes a complete short sentence in the middle of a paragraph will look OK in strong format.


  8. Avoid using too many graphic images on a page. Browsers will only ask for a few files at a time (four, by default, in Netscape and Internet Explorer), and won't ask for another until an earlier file is completely loaded. One large graphic can be loaded much sooner than a multitude of small graphics. Somewhere between a half-dozen and a dozen graphic images is the maximum that you should have on any one page, with the smaller number appropriate for a home page.


  9. Avoid using graphic images or HTML files that are too large (in kilobytes). The larger files will take longer to load, especially for people using dialup connections to the internet. A home page should be especially conservative in this respect. Any link that leads to a page with many graphics or with large graphics should have a warning, so that the reader will be able to decide whether or not to follow the link. Twenty to forty KB is the upper limit on file sizes to still have quick load times; navigational pages should keep to the low end of that range, although content pages can be larger. A shortcut button array graphic file of fifty or more KB will take a noticeable time to display.


  10. Avoid using trite images or phrases, especially "under construction." All Web pages are always under construction. You should put them up for the world to see as soon as they are better than having nothing, and then keep improving them.


  11. Avoid using internal labels containing space characters as destinations for links. The HTML specification does not permit space characters within URLs, and there are browsers that are not as forgiving as Netscape in that regard. Some browsers in fact will not even follow the link. Other browsers will go to the top of the page, but will not jump down to the intended location within the page. To tell if you have made this mistake, follow the link in Netscape and then look at the current location: there should be no space characters after the "#" near the end of the URL.


  12. Avoid using graphic images that contain only text. Sometimes this is a reasonable approach, especially for banners at the top of a page. If you do it, be sure to provide ALT text, so that non-graphical browsers can convey the same information. Extended text-only graphics should be avoided.


  13. Avoid using commercial hit counters or guestbooks. Since you have no control of these services, your page might be broken at any time. Furthermore, if your university is a public institution, you should not be providing free advertising to any specific company. The guestbooks are a particular problem, because you don't know, and have no control over, what that company does with the information it can gather in the process of running the guestbook.


  14. Avoid using personal accounts on any computer system to serve departmental or organizational Web pages. You would certainly hope that the organization would outlive any one individual. Furthermore, personal accounts can be removed at any time, and disk space quota limitations on many systems can result in the seemingly random deletion of files. As commented earlier, it is quite reasonable to have E-mail links that point to an organizational account that is set to forward to the individual maintaining the Web pages. It is not reasonable to build Web pages that will have to be revised as soon as the responsibility for maintaining them passes to another person.


  15. Avoid placing adjacent to a link any blue bullets or other small graphics that are not clickable parts of that link. Blue is the default color of clickable links in most graphical browsers, and you are likely to frustrate your reader, since clicking on the graphic will accomplish nothing.


  16. Avoid saying "Click here to ...", because that doesn't make much sense for Lynx users, who have no mouse, only arrow keys. "Select" is a more universal verb, but a statement like the following is even better:

    Other guidelines are also available on-line.


  17. Avoid using two consecutive links that lead to the same destination. (This problem often happens with the first link on a graphical image and the second link on some descriptive text.) If you have an in-line image (thumbnail logo, or whatever) that is clickable, and you have adjacent text that is also clickable to get to the same location, then the image and the link text should be part of one anchor tag, by placing the image inside the link, along with the link text.

    Including the in-line thumbnail logo inside the link causes the image's ALT string, if any, to be part of the link text when viewed from Lynx. This also has the result that in Lynx a single down-arrow keystroke will move past that link, instead of requiring two keystrokes. Be sure to include a space character or non-breaking space (" ") between the image and the rest of the link text.

    Netscape displays a characteristic (blue or magenta) border around an in-line graphic, when the graphic is part of a link. The border is continuous with the underlining of the text part of the link. Clicking on the icon functions identically to clicking on the highlighted text of the link, and with many graphical browsers there is no "dead" space between them where clicking accomplishes nothing.


  18. Avoid having consecutive images with no separators (line break, paragraph break, or horizontal rule) to force the next image onto the following line. The resulting display will be changed radically if the window width is larger or smaller than expected by the author: items intended to be on the same line will be arranged on consecutive lines if the window is too narrow and items intended to be vertically arranged will be in the same line if the window is wide enough.


  19. Avoid using graphics that include extensive areas in which the color (shade or brightness) changes gradually. Examples include sunsets, the sky in general, and rainbows. The problem is that many browsers, especially on PCs running Windows, have only a very limited palette of colors available at any one time. The consequence is that the various subtle shades of color are all displayed using the small number of distinct colors that are available, producing large areas of uniform color with distinct boundaries - a sort of "striping" effect.


  20. Avoid using multiple, different URLs to link to the same page, or using multiple different URLs to specify the same image file. Again, this doesn't make the page itself fragile, but in the case of links it does reduce the effectiveness of the search engines in leading people to your page, and for both links and images it increases network traffic and server load, wastes space in the browser's cache, and makes the page load more slowly, on average. In some circumstances it could prevent your page from being listed in the search engine; in other situations it will appear multiple times, slowing the search engine down.

    There are three ways this might happen:

    1. If your pages are on a server that is not case-sensitive in paths and file names, the server will provide the correct file no matter what combination of uppercase and lowercase you specify, but the browser will not know that it is the same file it already has in its cache, so it will ask the server to re-send the file.

      The simplest way to avoid this problem is to be sure to always use all lowercase letters in URLs for resources on such servers, even though any combination of case will work to get to the pages.

    2. If your pages are on a server that automatically serves up a standard home page from a directory whenever the URL ends with a slash (e.g., http://www.cats.ohiou.edu/cwis/keyword/index.html is the same Web page as http://www.cats.ohiou.edu/cwis/keyword/ ). Having both URLs in use will result in duplicate entries in indexes and duplicate copies in browser caches.

      The simplest way to avoid this problem is to be sure to always write the URL out in full, including the filename. This is also required in order to be able to test the link from your hard disk, if it refers to one of your own pages.

    3. If your pages are on a server that has multiple names, your page could be referred to with a URL that uses any of the IP addresses for the server, and still have the link function correctly. You should consult with the system manager of that server to find out the name that is most likely to continue to work, and standardize on that one.


    The complete URL (with the correct IP address if it is an absolute URL), including the full path and filename, should be used both in anchor tags and in imagemap data files.


Return to Appendix IV  Return to Roadmap


Dick Piccard revised this file (http://ouvaxa.cats.ohiou.edu/~piccard/oacrao97/fragile.htm) on November 13, 1997.

Please E-Mail comments or suggestions to "piccard@ohiou.edu".