| Forums | Email a Colleague | FAQ |
|
Please peruse our frequently asked questions list below, check out the archive of past columns, read up on the categories that interest you most.
HTMLDear Dr. Website®: Someone told me that there are sites that check your HTML for coding errors. Where can I find one of these sites?Because even the most eagle-eyed Web designers can forget closing tags from time to time, the best way to ensure that your HTML is up to code is to run your files through a validator. Dear Dr. Website®: What could cause the occasional stray text characters and other weird symbols that show up on my Web pages when there's nothing in the source code to indicate anything's there? You may be inadvertently entering hidden control characters into your Web documents as you type in your word processor or HTML editor. Some HTML editors offer a menu command for stripping out these troublesome characters, or "gremlins," as they're sometimes called. If you're a Mac user, you can strip them out with Bare Bones Software's BBEdit or World Wide Web Weaver, among others. On the Windows side, the Textpad text editor from Helios Software Solutions will help you strip out hidden control characters. Dear Dr. Website®: Is there any way to set up table data to retain some semblance of structure when accessed by users whose browsers don't support tables? One approach you could take would be to produce two sets of Web pages, one optimized for users with browsers that can support tables and a set that will be viewable by text browsers and other browsers that do not support tables. In the long run, this approach -- while successful -- will prove time-consuming and can lead to confusing and intricate page updates and maintenance. Dear Dr. Website®: How do I merge cells in my Netscape tables? I have several mini-headers below my table header that I want to spread across two columns instead of one. In order to spread a header across two columns, you'll need to specify the COLSPAN attribute in your table for the appropriate cells. A similar attribute is ROWSPAN, which spreads the contents of one cell over several rows. COLSPAN and ROWSPAN can appear in any table cell (<TH> or <TD>) tag. With COLSPAN, you can specify how many columns of the table this cell should span. The default COLSPAN for any cell is 1. The example below spreads Item 2 across two columns: Dear Dr. Website®:Are there any HTML editors that let you spell-check? HTML editors that act as add-ons to word processing programs will, of course, let you perform spell-checks--but you're liable to be hampered by the spell-checker hiccuping on every HTML tag. Others, such as Quarterdeck's WebAuthor, an add-in to Word6 for Windows, come with custom dictionaries for recognizing HTML tags. Another solution for this is to add the various HTML terms (such as HREF or EM) to a custom dictionary of correctly spelled words.Dear Dr. Website®: I want to include some technical articles on my Web site, but I'm having difficulty replicating the Greek letters that appear in equations. What can I do to create these characters? The HTML 3.2 specifications include support for the <MATH> tag for enclosing mathematical equations. Until the leading browsers include more support for this tag, though, you're pretty much on your own. The ISO-Latin-1 (ISO 8859-1) character set supported by most browsers includes hardly any Greek letters, so don't expect much from its list of codes for special characters. You'll find character codes for a Greek beta (ß) and mu (µ), but that's about it. A completely HTML-based solution will require support for multiple character sets, and that may be a ways off for some platforms. Dear Dr. Website®: How can I redirect visitors to my new page or domain using META tags? Simply set up your old page something like this (and be careful with the quotes): Forms and interactive designDear Dr. Website®: Do you have any suggestions for troubleshooting when a CGI script doesn't work?After you debug your script, making sure you can execute it from your shell account's command line is the first--but only the first--step toward ensuring that it will execute properly for your Web visitors. Dear Dr. Website®: On my site I have several interactive forms where the message is sent to me with a mailto URL instead of being passed to a script. The problem is that when I get the form's data, it's coded as one giant text block with all kinds of extra characters. There are "+" signs instead of spaces, and brackets like "(" and ")" come through as "%28" and "%29". Is there an easy way to strip these characters to make the input easier to read? The garbled form output you describe has been one drawback for forms with mailto ACTIONs, which are not decoded by the browser before being sent on; another drawback is that some older browsers do not support forms with mailto ACTIONs. Still, this method of returning form data has become prevalent among users who either don't have access to their server's cgi-bin directory or don't have the resources to develop and implement CGI scripts for their forms. Dear Dr. Website®: I need to set up a Web site where people can e-mail information to our company and have it appear on a Web page automatically -- for example, as a link to their message. I've seen this done but can't find an appropriate script. The situation you describe calls for what is commonly known as threading software. Threading software programs process a file of mail messages into a collection of cross-referenced HTML documents. Each of these HTML documents represents a separate message in the mail archive and each in turn contains links to other documents, so that all the mail messages can be read one after the next or browsed by following links. Threading software also organizes posts according to topic, depending on the contents of the message's subject field. Dear Dr. Website®: I am building a form with a number of input fields, but unfortunately none of the fields seem to line up with each other. The <ALIGN=CENTER> and other positioning tags don't seem to work with the <INPUT> tags and their attributes. As a result, my HTML documents have input fields scattered all over the page. Is there something I can do to make these forms look less cluttered? It sounds like you're making the common mistake of using the ALIGN tags for items other than wrapping text. In order to correctly position your form's input fields, you'll have to use tags such as <CENTER> </CENTER> to correctly position them. Another suggestion is to keep most of the field lengths the same. The uniformity of the input field lengths will give your pages a cleaner look, which will help make them look more professional and readable. Dear Dr. Website®: I am interested in learning how to code a script that allows the same HTML document to be accessed many times, but with different graphics each time it loads. I've seen this used by many of the search engines on the Internet. How can I use this technique on my pages? Search engines such as InfoSeek and Lycos have used this process to place a different graphical advertising banner on the search results page each time a user conducts a text search; whenever possible, an advertiser related to the subject of the search will have its banner displayed. Although this is a fairly commercial use of this technique, there are many other possible uses. While the context-sensitive approach that the searching sites are employing will require some database integration so that the search keyword can be matched to the appropriate graphic, you should be able to implement a more simple version of this process by either pulling from a random pool of graphics or by rotating through a number of selections. Dear Dr. Website®: Our site has grown to the point where we're soliciting major advertisers, and we want to be prepared to implement banner advertisements, rotate them and keep track of the responses. Where can I find a program to streamline displaying and tracking banner ads on our site? There are several commercial products and services for managing advertising for a site, with widely varying pricing scales. Web Elite has a product called Ad Master designed to help Web sites place, rotate and track banner advertisements, including generating content dynamically. The company also offers on its Web site a free 45-day demo of its ad management software, which runs on most Unix platforms. Dear Dr. Website®: I'm looking for an easy way to include a graphical index on my company's site. How do client-side imagemaps work? Unlike imagemaps that depend on the server for their processing, client-side imagemaps require no CGI scripting in order to work. With client-side imagemaps, the "hot spots" that users click to jump to new locations are specified in your HTML coding instead. You would use the <MAP> tag, which is supported in the HTML 3.2 draft specifications, to embed a map file, and <AREA> tags to define each hot spot's shape and attributes. Dear Dr. Website®: In which cases do you recommend using imagemaps rather than real links? As a graphical index to your site, an imagemap can offer the benefits of nonverbal communication. Even if your imagemap contains some labeled text, the graphical portion can help to convey information more quickly. This is similar to the way that the icons used by airport signs and some traffic signals are designed to communicate to a broad, international audience. From a strict design standpoint, the two main caveats to bear in mind are the importance of providing a text-based alternative to allow access for all users, and to make sure that the amount of time it takes your imagemap to display isn't so excessive it drives away readers Dear Dr. Website®: From time to time I've seen Web sites that offer to e-mail you when they've added updated information on their pages. How can I add this feature to my Web page? One service that provides this kind of e-mail notification free of charge is NetMind's URL-minder. Users of the service register the URLs they want to be notified of changes on and receive an automatically generated e-mail message when URL-minder detects that the page has changed. Since the service currently searches for updates on a weekly basis only, it may not prove useful for pages that change daily -- but then again, would you really want to bombard your visitors with so many e-mail messages if your pages have more frequently updated content? Graphics, sound, and videoDear Dr. Website®: What is the PNG format, and how does it differ from GIF or JPEG?The Portable Network Graphics (PNG) format, pronounced "ping," emerged after a 1994 patent controversy over the GIF format appeared to threaten GIF's widespread use. Dear Dr. Website®: How can I get rid of the small gap between a left-aligned image and the edge of the browser window? As you've discovered by now, most browsers will automatically offset the contents of a Web page by several pixels along the window's top and left margins. This can result in a lot of headaches for a designer who tries to position a GIF precisely within the browser window or a background image. Interestingly, the number of pixels your image is offset when viewed by your readers will differ, depending on which browser is used; this can even vary among several versions the same browser. Designer David Siegel offers real-world examples of how these variations in browser versions affect your page's display at Browser Offsets: The Good, The Bad, and the Ugly. Dear Dr. Website®: What are the most popular video formats, and what can I do to reduce their file size as much as possible? Web video files can take a very long time to download and display because the amount of information they must contain is enormous. By now, QuickTime is the most commonly used video format on the Web. MPEG (which, like QuickTime, is fully cross-platform) and AVI are other frequently used video formats.Dear Dr. Website®: I need help figuring out how to create a good-looking drop shadow for an image on my page. The images I'm using are color GIFs in Photoshop. I use Photoshop to add feathered drop shadows or blurred edges to the graphics, then I open the file in Transparency to drop out the background color. Instantly, the drop shadow or the edges look like they have a whitish border around it, which is not the effect I'm going for at all. How can I get around this problem? Should I just admit defeat and give up my favorite effects? One of the reasons drop shadows look so nice in Photoshop is that the edges are often anti-aliased slightly against the background color. The same goes for the effects of the various blur filters. If your image is placed against a white background. that meansthere will be a lot of very light grays and off-whites in your image. Since Transparency will knock out only one color in your image, these slightly off-white, anti-aliased pixels will suddenly stick out like a sore thumb. You may have to go into your Photoshop file and correct some of the glaring colors by hand, pixel by pixel. Java and JavaScriptDear Dr. Website®: Recently I visited a page with a very dramatic background effect. When the page loaded, the background seemed to fade very quickly from black to white. How did they do this, and how can I add this kind of effect to my site?The effect you describe is one that can be achieved easily through JavaScript. Kouichiro Eto's fade script is a publicly available JavaScript script that can generate this kind of gradual background color fading. One bonus is that you'll have a good deal of flexibility for modifying the colors used and for varying the rate at which the color change takes place. Dear Dr. Website®: I've seen a bunch of sites that have custom messages that scroll across the bottom border of the browser window. How can I create this kind of scrolling text? While there are a number of ways to put scrolling text and graphics on a Web page--from Microsoft Internet Explorer's MARQUEE tag to Java applets--the common way to incorporate scrolling text that appears in the status bar at the bottom of the browser window is via JavaScript. Dear Dr. Website®: How hard is it to learn JavaScript without already having learned Java or C first? While it's not really a prerequisite, it's very helpful to understand the basics of Java or C before learning JavaScript--or as much as you can about programming in general. If you can spare the time, I'd recommend picking up a beginner's book on C to gain a crash course in its command and syntax, since JavaScript uses some of the same conventions. If you ultimately want to become well-versed in JavaScript, it will be worth it to get a good grounding from the start. FramesDear Dr. Website®: Is it worth the trouble to convert my Web site to using frames?Debating a large-scale change to your site's design interface, such as frame-enabling all content, should be driven more by considering how the redesign would better serve your site's function than by simply wanting to use a new or popular technology.Dear Dr. Website®: Is there any way to get rid of extra space at the top of a frame? There are a couple of attributes available for the <FRAME> tag that might help you do that. MARGINHEIGHT is an optional attribute that can control the upper and lower margins of a frame. Similarly, MARGINWIDTH takes care of left and right margins within a frame. Your <FRAME> tag would then read something like this: <FRAME NAME="url" SRC= "somefile.html" MARGINWIDTH=0 MARGINHEIGHT=0> The value you enter for both margin-related attributes is measured in pixels. Site managementDear Dr. Website®: How can I improve my site's placement in search engine results?The appropriate way to include information about your Web pages for indexing or cataloging programs is to use the <META> tag (for describing "meta information") within the <HEAD> part of your Web documents.Dear Dr. Website®: I want to make a number of application files available for downloading from my Web site, but users aren't able to decipher the files after they download them. How can I solve this problem? When a Web server responds to a request for a file in a URL, it returns a type of information--called a MIME type--that specifies what type of data will be returned. MIME types can describe text, graphic, and all sorts of other application formats. But if your Web server isn't properly configured with a MIME type that specifies the kind of data in your Persuasion files, then it won't recognize and know how to handle these specific file formats. Dear Dr. Website®: I have a restricted area on my site that's only accessible via a common password. Right now, I use a support script to implement password checking. I'm discovering that this form-based password system isn't very secure. Is there a better way to control access to my site? It's probably best to put these documents in their own directory protected via your server's built-in security features. With this general access-control scheme, you can make your own lists of users with access privileges to certain directories. Dear Dr. Website®: Some users on my company's Web site have a tilde character (~) that appears in their URLs. Is it completely necessary for them to include the tilde when circulating their URL? One user has said he'd like to omit it if possible. The tilde character tells the HTTP server to access the user's public_html directory, rather than the main document tree, for the file in question. That way, visitors can pull documents from your users' directory directly without accessing your site's main document directories. You or your system's administrator can, of course, reconfigure your site's directory structure to let users access whatever subdirectories you'd like. It's most important, though, to consider the access restrictions you want to impose on your site's directory structure instead of just accommodating one user's desire for a simpler URL. Dear Dr. Website®: Can you suggest the best mechanisms for maintaining a solid firewall while still providing Internet access to people behind the firewall and to telecommuters? In my corporate communications I have had a lot of trouble, particularly with attachments. It can be difficult to achieve that balance between maintaining corporate network security and providing functionality to remote users who are telecommuting or are clients. A great resource for this issue can be found at the Security Mailing List FAQ (frequently asked questions) list. Dealing with attachments is also a very common problem that is encountered when working with several disparate systems and protocols. The solution to this problem is not easy, as you may already have certain networking protocols and practices in place. Standardize on MIME (Multipurpose Internet Mail Extension) for handling attachments. Part 2 of the comp.mail. mime FAQ offers an extensive listing of MIME products. Dear Dr. Website®: Is there an easy way to change the default filename for a Web directory? Once you've established the filename you want to use for your default page, ask your system administrator to make the necessary change to your server's configuration file for you. For many servers, this file will be called srm.conf. Your Web administrator will simply need to specify in the server's configuration file what filename you plan to use as the default page to be served up. Dear Dr. Website®: I've heard that some Internet service providers don't let their customers implement forms or imagemaps because they say giving users access to the cgi-bin directory is a security risk. My provider has made accessing the cgi-bin directory convenient for me by putting one under my directory. When I ftp to the site to upload changes, the imagemap or other scripts go into the subdirectory under the directory of my home page, instead of a cgi-bin directory that encompasses the entire server. Why isn't this option used more? Is it more work for the provider? It seems like a great solution to me because the cgi-bin can be accessed at any time without having to bother the overworked provider, and the cgi-bin is safe from hackers who might sabotage my site. I would like your opinion on this method. While this option may make it easier for you to maintain your Web site on your provider's servers, it also makes it easier for you to violate system security and overuse resources. Such outright access to a cgi-bin directory without screening of the applications by your provider, means that you can run whatever kind of application you want from your cgi-bin directory. While this may be a convenience for you, it is a risk to the provider in terms of both security and resources; there is nothing to stop you from running applications that take advantage of the server in ways that many hackers dream of daily. Statistics and access checkersDear Dr. Website®: Can you help me interpret my site's traffic reports? What are unique URLs, unique hosts, and "304s"?The total number of unique URLs is the number of separate pages requested by all users, including any nonexistent URLs requested in error. The total of unique hosts is the number of separate machines that request files; this is more useful for counting unique visits rather than unique users, because there are some machines--such as proxy gateways for the large online services--that request files for many users. Dear Dr. Website®: Is there an easy way for me to put an access checker on our home page? I want people to see a little announcement that says something like "Greetings! You are the 512th visitor today!" Everyone I've asked has said I need permission to access our server's cgi-bin directory, but what does that mean? While putting in an access checker on one's home page is not overly complicated, it does entail the need for permission to access your server's cgi-bin directory. The cgi-bin directory is where the script (usually written in a programming language called Perl) to execute this process will live. CGI stands for Common Gateway Interface. Using this interface lets a standard Web page incorporate extended features such as forms, on-the-fly page generation, and access statistics. Dear Dr. Website®: I run a small Web site in Albuquerque, and recently we have had inquiries from advertisers who would like to place sponsorships on our site as to how many "hits" and "users" we have been getting. While we have no trouble measuring the number of hits to the site and the pages contained therein, we have not been able to tally the number of users that come to our Web site. This number is difficult to arrive at specifically because of ISPs that allocate IP addresses dynamically as well as by the commercial online services, which tend to cache frequently accessed Web pages on their server. Have you found any way to get around this roadblock? The issue of the number of unique users that come to an individual Web site is a complicated, yet important, number. This number is most apt to represent the "readership" of a Web site as defined by traditional media terms. Dear Dr. Website®: Is there any way to determine what other sites have links to my site and what the URLs of those sites are? A standard way to check which sites contain links to yours is by analyzing your server's referer_log file. A more convenient--and less technical--method is provided by the Alta Vista search engine. |
| |||||||||||||||