★ wanayoo — archive 1999 http://webdeveloper.com/drweb/96Oct07-drwebsite.htmlNouvelle recherche | Portail wanayoo

DR. WEBSITE

How to Guard Against Common Code Errors

Dear Dr. Website®: I've been asked to help compose an internal style guide for my company's Web pages, since many individual departments submit these documents for our intranet. Can you suggest some of the most common mistakes that beginning Web authors make?

I can think of a number of common HTML coding mistakes, but most cause such blatant display problems that they can be caught easily if you remember to test your pages before serving them up. Unpaired elements--such as having an opening anchor tag with no corresponding closing </A> tag--are among the most frequent oversights. Similarly, browsers won't be able to distinguish HTML tags that are missing a single opening or closing bracket, and will cause display problems as a result. Unpaired quotes around URLs within a link can also cause unpredictable results. Some browsers, like Netscape Navigator, will draw attention to offending coding omissions if you use their option for viewing source code. However, a more thorough way to identify coding errors is to validate your HTML, either through a program your system administrator can set up for you on your server or through a Web-based HTML validation service like WebTechs Validation Service. Special characters used in HTML elements, such as the >, < and & symbols, will display incorrectly if they appear on their own in the body of your Web documents. It helps to conduct a global search of your copy for these characters before converting a document to HTML, and replace them with their corresponding codes. In addition to these common coding mistakes, you may also find it worthwhile to examine basic design issues, such as the pitfalls of concocting elaborate effects (such as having competing animated GIFs on a page) at the expense of meeting users' informational needs, or letting Web pages grow stale by neglecting to update pages as necessary.

Mailing lists vs. newsgroups

Dear Dr. Website®: We run a popular industry association Web site, and one of the most important issues we hope to address is open communication with our members. Which is more accommodating for users: a mailing list or a newsgroup?

Both newsgroups and mailing lists offer good forums for fueling discussion and perhaps a sense of community among a specific group. The deciding factors for you will probably revolve around ease of access, the amount of traffic you expect will be generated, and the breadth of topics to be discussed. Although your users should be able to subscribe and unsubscribe at will to either a newsgroup or a mailing list, problems with subscribing can crop up frequently with some mailing list software. Newsgroups have the added bonus of letting users pick and choose among threads they're most interested in. If there is a great deal of user participation, traffic on a mailing list could grow so high as to be undesirable--unless you also make a digest version available.

Adding math formatting

Dear Dr. Website®: I'm designing a site for a scientific journal that has a lot of math equations in each article. How can I recreate the superscript used to create exponents and other math symbols in my Web versions of these articles?

You can designate superscripted or subscripted text anywhere in your HTML document within opening and closing <SUP> or <SUB> tags, respectively. The <MATH> tag, which is included in the proposed HTML 3.2 specification for facilitating the display of complex mathematical equations, is not yet widely supported by many browsers across all platforms. If you have complex math expressions to reproduce, you may prefer to preserve your original document's layout through a program like Adobe Acrobat. If your original articles were produced using the standard TeX language for technical publishing, IBM's Techexplorer plug-in can be useful for recognizing your formatting and displaying it in your Web documents.


Please send your site design and development questions to drweb@internet.com, or visit the Ask Dr. Website page.
Reprinted from Web Week, Volume 2, Issue 15, October 7, 1996 © internet.com Corporation All rights reserved. Keywords: HTML, content Date: 19961007

http://www.internet.com/