Easy Steps to a Great Site

Easy Steps to a Great SiteTips, tricks, and tools that will help you spruce up a dowdy home page--or build a brand-new one. Dennis O'Reilly

Next year the World Wide Web will reach its 13th birthday, which in Internet years is pushing middle age. The Web is no longer a novelty--it's a part of everyday life. And that makes it both easier and harder to establish yourself online, whether for personal or for professional reasons.

Building a Web site is easier these days because of the profusion of high-quality Web tools and services, many available at little or no cost.

But it's also more difficult because simply having a Web site isn't enough anymore. Your site has to be good, and it has to keep growing. In fact, maintaining and upgrading your site may be greater challenges than creating it.

If you're just starting out, this month's Step-by-Step provides a primer on building a simple Web page. But getting that first page posted is only the beginning. It's the upgrades to your site that will keep people coming back.

That's where we can help. We created a basic Web site (see Figure 1) and beefed it up with a message board, two JavaScripts (a navigation menu and an image slide show), and a shopping cart (see "Road Map to a Site Upgrade").

We created our 11-page Web site and got it online for the cost of a Web hosting service, which handled the registration of our domain name for an additional $32 (see "A Host of Hosts"). We did not have to use any advanced Web-development tools or techniques, either. All we had to do was tweak some preexisting HTML and JavaScript (see "A Mini Site Makeover").

Before you begin building pages, decide who you want to bring to your site and what you want them to do there. The goal of our simple site was to introduce people to potential pets currently housed in shelters. The steps we followed are applicable to all sorts of business and personal sites, however.

Think of site visitors as your guests. The design of your site should make them feel welcome and should help them find the information they're looking for quickly. That's why the interface and navigation elements are so important, even on a site that consists of just a handful of pages.

Prioritize the information and services you want to offer your visitors, and make the most important ones easiest to get to.

We planned five sections for our make-believe site, each of them accessible with a single click from the home page or from any other section. All 11 pages on our site include links to the home page and to the top levels of the other sections.

Consider how people will move through your site. Web professionals create "user scenarios" that describe different types of site visitors.

In our example, a young couple looking for a new pet might want a quick way to locate potential adoptees but would also need the shelter's street address and phone number. Recent adopters might want advice on caring for their pet, so we would have to ensure that the shelter's pet-care information is easy for them to find.

Web developers often use flowcharts and storyboards to help them visualize the content of a site's pages and the links between them. You can use a flowcharting program such as the SmartDraw shareware, or you can go the low-tech route: Represent each page with a 3-by-5 card and then draw lines on the cards to represent links. It may sound silly, but this technique can help you get a bird's-eye view of your site.

We made another important choice in designing our pages to use a basic version of Cascading Style Sheets, a powerful method for formatting Web pages. Sites created with CSS can have simpler code than HTML sites.

Versions of Microsoft's Internet Explorer and Netscape prior to 4 don't support CSS, so we duplicated the CSS formatting in each of our site's HTML pages. Most Web editors can handle both CSS and HTML. For a discussion of the pros and cons of working with CSS, see "The Importance of Being Compliant."

The Domain Name Game

Getting a URL is a simple matter of visiting a registering-service site, entering your first choice in the site's domain-name search box, seeing if the name is available, and plunking down your $35 (or less) for the first year of use. Here are a few things to think about.

Keep your URL short and easy to remember. Try to choose one that tells people a little bit about the site. We chose "furrycompanions.com" for our fictional site, but we could've used "notarealpetsite.com" or "finefurryfriends.com".

Stay away from strange suffixes. Unless you're running a school (.edu), a nonprofit organization (.org), or a government agency (.gov), stick with .com.

Register some variations. If you think your domain name is going to become a valuable asset or if your business is entirely Web-based, you may want to register the ".net" and ".org" versions of the name as well. This will stymie future domain-name interlopers.

Check with your Web host. Many Web hosting services include domain name registration in some of their service packages. Some offer customers subdomains of their own domain--for example, "furrycompanions.hostname.com". See "A Host of Hosts" for more on hosting services.

The granddaddy of registrars is Network Solutions, but these days you have many choices for registering a new domain. Check out RegSelect for advice and pricing information on accredited registrars. The standard charge is $35 per year; Web-hosting service Verio, however, currently offers to register .com, .net, and .org domain names for only $19 per year. Visit Verio to check out the offer.

Planning Your Upgrades

When it comes time to beef up your site's features, you can find lots of free or inexpensive Web site additions on the Net. And getting them on your site often involves little more than pasting some code into one of your pages. Here's a quick look at some of the better add-ons we came across.

Looking to track how many people have visited your site? Microsoft's BCentral offers the free FastCounter, which tracks the number of visitors to your site. BCentral also provides soup-to-nuts Web services for small businesses, including domain-name registration, e-mail, Web hosting, and Web site templates, for prices starting at $30 per month.

A quick and easy way to engage your visitors is to poll them. Votations.com and Create a Poll let you create custom polls for free, the former with as many as 50 answers and the latter with a limit of 20. You can include linked images and customizable form fields in Votations.com's polls; Create a Poll gives plenty of options for formatting results.

We used a couple of JavaScript applets to add interactivity to our demonstration site. Two sites--JavaScripts.com and 24fun.com--have great selections of free, customizable scripts for download. Another site, called HostedScripts.com, offers free CGI scripts that allow you to add features such as message boards, mailing lists, and password protection so you can limit access to your site to registered users.

Speaking of message boards, Nexus Web Development offers a free message board, among other free site components. Creating your message board is quick and simple, and you're even offered rudimentary design choices, but you'll have to abide banner ads on some of the message board pages.

The board on our demonstration site is Server.com's DiscussionApp 4, which stores as many as 2000 messages and is easy to set up and customize. Server.com also offers free mailing-list, calendar, and guestbook applications.

Finally, Atomz.com's Express Search is a powerful hosted search engine that's free for sites containing fewer than 500 pages. You can customize the appearance of your search-results page, and you can generate reports on the terms that visitors to your site are searching for.

A Mini Site Makeover

The Web's pizzazz comes from its active elements, many of which are powered by the JavaScript language. JavaScript can make page elements jump, move, and otherwise respond to a site visitor's input. And most of them do so without having to rely on constant communication with a Web server, because they're designed to download to the visitor's browser along with the Web page.

We added two JavaScripts to our basic site's home page--an image slide show with links to pages elsewhere on the site, and a rollover menu with descriptive text that appears as a visitor mouses over menu options. We also created a simple product catalog for the site, using Microsoft's BCentral service. In all cases, introducing the new elements entailed pasting some code into the site and making a few minor tweaks to get everything working properly.

"Road Map to a Site Upgrade" shows which sections of the JavaScript we altered to suit our needs. Once you become familiar with adapting simple scripts to your site, the possibilities are almost endless, though the specific process will vary every time.

Let the Slide Show Begin

Adapting code from free repositories or other sites is a time-honored Web tradition. Just be sure to give credit where it's due. We got our slide-show script from 24fun.com, but you can view it by going to furrycompanions.com and clicking View, Source in Internet Explorer or View, Page Source in Netscape. The script begins immediately after the <body> tag and extends to the second </DIV> tag.

Some of the JavaScripts you'll find house their code in an external file, which you'll need to download before adapting the script to your site. Our slide show requires the file JavaScript Slide Show. Place it in the same folder as the Web page that will use the script.

Once you've opened furrycompanions.com in your browser and you've brought up the source code, select all the text from the end of the <body> tag down to and including the second </DIV> tag. Press Ctrl-C to copy it, and then--in your text editor (not your browser)--open the Web page that will use your customized slide show. Position the cursor at the far left of the line immediately following the page's <body> tag, and press Ctrl-V to paste the script into your page.

Collect the images you want to include in the slide show. You can use as many images as you like, but they must all be the same size for the dissolve effect to work. To alter the size of your images, open them in an image editing application such as Adobe's Photoshop Elements (see "Your Web Toolbox") and use the program's resize function.

Once you've prepared the images you want to use, it's time to start tweaking the script to make it work in your site. Start by backing up the pages you're working on. Then go back to the JavaScript you just pasted, and start changing variables.

Most free scripts include instructions on which variables to change, and they're easy to find once you know what to look for. The quoted text that follows each 'imgsname[x]=' in our slide show script is a variable that points the browser to an image that will display. Replace these variables with the names of your image files (be sure to retain the quotation marks before and after each file name).

You'll need to make a few of these changes to get a script working, but once you get the hang of it, you'll have a powerful technique for customizing your Web site. "Road Map to a Site Upgrade" walks you through the various changes we made in adapting the slide show and rollover scripts to our furrycompanions.com site.

A Simple Rollover Menu

Some JavaScripts are set up so that you can paste all the code directly into your Web page. The menu on our site was adapted from a script written by Clarence Eldefors. We simplified the original by removing the background and rollover colors. You can download the original script, or you can adapt our version by viewing the source code of furrycompanions.com in your browser.

The menu script is located in two places on this page. The first begins immediately after the </title> tag, starting with the line <style type="text/css"> and running to the first </script> tag. Copy all this text and paste it into the Web page at the far left of the line below the page's </title> tag. This chunk of the menu's script doesn't need to be altered at all.

Now return to our sample source code, and find the second section of this script. It's in a table nested in our page's main table. Select all the text starting with the tag that reads '<table border="0" cellpadding="3">' and ending with the first of the page's three </table> tags. Copy this block of text, and then go back to the page you're adding the menu to. Place the code where you want the table menu to appear within your page's <body> and </body> tags.

Customizing the items for your menu is a simple matter of tweaking some text and variables. See "Road Map to a Site Upgrade" for the details.

Low-Cost, Low-Fuss E-Commerce

It's never been easier for a small business to place its product catalog on the Web. You can pay a developer to custom-design an online catalog and an order-processing system if you like, but many businesses find it faster, cheaper, and easier to use the e-commerce services offered by such companies as Yahoo Store, Bizfinity, and Microsoft BCentral.

We used BCentral's Commerce Manager--which costs $25 a month and offers you a 30-day free trial--to create an extremely simple ten-product catalog for our pet-adoption site's Pet Resources section. Signing up for the service took only a few minutes, and we had our brief catalog of pet-related books posted on Microsoft's MSN Marketplace just a few hours after our initial registration.

The first time you log in to Commerce Manager, you enter into your catalog the products you wish to sell, either singly or many at a time, using the service's spreadsheet template. You must provide a name, a summary, an identifying number (SKU), and a price for every product. Dividing your store into departments is optional--the service defaults to 'top level' until you designate subcategories in your catalog. You can set shipping charges by package size and weight, upload a picture of the item to include with its listing, and provide a longer description.

Other optional abilities allow you to add keywords, set auction attributes (reserve price, opening bid, and minimum quantity), designate as many as 30 product variables (size, color, and so on), and add the shopping-cart HTML code to your site. Figure 2a illustrates how a single entry appears on the MSN Marketplace, and Figure 2b shows the complete list of our catalog entries.

Tying Up Loose Ends

Even if your site's visitors will number in dozens rather than millions, they'll use many different browsers running on a wide range of systems. Some of your visitors will browse at breakneck speeds over a broadband connection on a 1-GHz or faster Pentium 4 running Windows XP; others will be stumbling along on a geriatric Windows 95 machine with a 33-kbps modem. Test your site on as many types of systems as possible, try it on every version of every browser that you can get your hands on, and use all kinds of access devices, from an office T1 connection to an old 33-kbps modem.

Where Is Everybody?

You can build the best site in the world, filled with information and services that your target audience will love, but you won't draw any visitors until you spend some time promoting your site.

The first way most people think of publicizing a Web site is by submitting it to search engines. Many site owners spend considerable time and effort making sure that their site ranks near the top when a prospective visitor enters specific search terms. But quantity isn't everything. In some cases, getting a couple dozen of the right people to your site can be more advantageous to you than getting thousands of the wrong people there.

Think about who you're trying to attract. For some local-interest or special-purpose sites, getting ranked in a search engine might not be the best way to go. When your site serves a small, dedicated community of visitors, a Web ring, which is a site that lists links to other sites on a specific subject, or a banner-exchange program, such as Microsoft BCentral's Banner Network, might be the best bet.

You submit your banner to the ring or exchange and agree to allow other banners to appear somewhere on your site on a rotating basis, just as your banner will rotate onto others. You gain free publicity, but you lose some control over your site's content because you won't know whose site banner will display when a visitor comes to your site. Yahoo's WebRing directory lists hundreds of Web rings in dozens of categories. You'll also find a list of banner exchanges on Yahoo.

It Ain't Over Till...

The site's up, your traffic is increasing, the postings are piling up in the message board, and all the e-mail comments about the site are glowing. But remember, your work isn't done: It's really just beginning. There will always be more content to add, new images to place, and revolutionary Web technologies to explore. No matter how carefully you plan, something will always surprise you.

But provided you maintain a strong sense of the site's goals and its target audience, Web services and free add-ons make it just as easy to run a great Web site as it is to run a good one.

Dennis O'Reilly is a senior associate editor at PC World.

Hosting Tips: A Host of Hosts

Every site needs a good home. And the quality of your Web host can mean the difference between putting up with a slow, banner-laden site and enjoying a speedy, reliable home page. Here are a few things to keep in mind when you evaluate Web hosting options.

Reliability is key: Free hosting services rarely offer the level of reliability and technical support that fee-based services provide, and the ubiquitous pop-up ads, banners, and other detritus that free services place on your visitors' screens are a real nuisance. Many of the ads that they display are stickier than leather car seats in August, lingering on top of your site visitors' screens during scrolling.

Check with your ISP: Many ISPs offer limited Web hosting as part of their Internet-access packages. You may receive as much as 40MB of free storage space on the company's server, though some ISPs offer considerably less than that. But even as little as 5MB of storage could be sufficient. If you don't plan to run a large, image- or multimedia-intensive site, and you don't anticipate tons of traffic to and from your site, your ISP's limited hosting services may be just the ticket.

Find out about support: If you use Microsoft's FrontPage extensions (which are necessary for FrontPage's search, hit counter, and other Web components), you need to find a host that supports them. In addition, FrontPage may require that your site be located on the server's root directory, so make sure your hosting service can satisfy these prerequisites.

Consider using a free host: One of the most popular free hosting services, Yahoo's GeoCities, is also one of the most reviled for its unshakable ad box. But for small sites, a free host can be great. You can find a helpful listing at Free Web Hosting Top 20. And you should also consider checking out the Hypermart for a list of free hosts for businesses.

Keep count: HostPro's site-management tools include graphical reports on usage.

Paid hosting services from such companies as HostPro, Yahoo's SimpleNet, and IASA Internet Web Hosting cost as little as $18 a month (plus a setup fee of about $40). At that price level you can expect to get a package that includes up to 100MB of server space, a domain name, and several e-mail addresses.

Most hosting services also provide basic page-setup and traffic-tracking tools, as well as assistance registering your domain name. You'll likely have to pay the registration fee (usually around $35) yourself.

Two reliable places to shop for a Web hosting service are the Web Host Directory and TopHosts.com.

Adapting Scripts: Road Map to a Site Upgrade

In creating our sample site, we developed two JavaScripts: a slide show and a rollover menu. Here's a quick rundown of how to adapt each of these scripts for your site.

Adding the Slide Show

1. Pull in your images: Change all the file names that follow 'imgsname[x]=' to the names of your slide-show image files. Include the complete file path to your images (A).

To add more images to the slide show, copy one of the lines under 'var imgsname=new Array()', and paste it into an empty line under the line that begins 'imgsname[3]='. Change the number appearing in the brackets to 4 for the first image you add, to 5 for the next one, and so on. Replace the existing image-file name with the name of your additional slide-show image.

2. Add links to your images: Change the file names following 'imgslink[x]=' to the names of the Web pages that you want the images to link to (B). Include the complete paths to the pages if these are stored in a different folder from the one where the page that uses the slide show appears.

3. Change the slide show's position: The slide show is currently set to run 20 pixels down and over from the upper left-hand corner of the browser window. To change the position of the slide show (C), reset the numbers after 'var imgstop=' and 'var imgsleft=' to the number of pixels from the top and left, respectively, that you wish to place it.

4. Change the speed of the transition effect: To make the transition effect run faster, reduce the number after 'var pause='. To slow it down, increase the number.

5. Change the length of time the images stand still: If you want to change how long each image remains on the screen, simply change the number after 'var standstill=' to the number of seconds you wish each image to be displayed.

NOTE: Be sure to add the file 'imgtransliner.js' to the folder holding the pages that the image slide show will appear on.

The Rollover Menu

1. Change the text of the menu selection: The menu items are located between the '<h3>' and '</h3>' tags in each row of the nested table. To change the text of the second item, for example, enter your text in place of 'Pick a Pet' (D).

2. Change the page that the item links to: Replace the file name in the quotes following '<a href=' with the name of the page you want to link to. Carefully include the full path to the page, and make sure that each menu item is within '<a href="x">' and '</a>' tags.

3. Change the rollover text: Replace the text within the single quotes after 'onmouseover="movein(this,' with a brief description of the page that the menu item following it links to. For example, the text that appears when someone mouses over the first menu item is 'Minibiographies of our adoptable critters'. The font face and font size are set in the last row of this nested table.

To add a new menu item, copy an entire row of the nested table and paste it onto an empty line immediately under your last menu item. Edit the new entry as described above.

Web Editors: Your Web Toolbox

You don't need to have $5000 worth of software running on a $10,000 chunk of metal to put stuff on the Internet. Here's a quick look at tools for the Web in three categories: no-end, low-end, and midrange.

The free way: If you have Windows, you have Notepad. With a little experience, you'll find that making quick tweaks to a page in Notepad--or any other text editor--isn't particularly difficult. Two free text-editing programs that go Notepad one better are Fookes Software's NoteTab Light and Evrsoft's 1st Page 2000 2.

For a few dollars more: Many people avoid HTML altogether by using "what you see is what you get" (WYSIWYG) Web-design products. The most popular of these is Microsoft's $169 FrontPage 2002. If you want to create a lot of pages in a hurry (and you don't mind occasionally convoluted code), WYSIWYG is the way to go. Once you get comfortable with HTML, an editor such as Macromedia's $89 HomeSite 4.5, SoftQuad Software's HotMetal Pro 6, or CoffeeCup Software's CoffeeCup HTML Editor 8.9 makes a great addition to your toolkit.

Another step up: Macromedia's $299 Dreamweaver 4 is a favorite everyday tool of many professional Web developers. It enables you to see a page and its underlying HTML code simultaneously, and it includes a Flash button editor and a JavaScript debugger. Another popular tool is Adobe's GoLive 5, which costs $284.

Image editors: We used Macromedia's $299 Fireworks to create the contact menu for our site. Fireworks also includes tools for animating and optimizing images. Adobe's $99 Photoshop Elements can't quite match the Web-readiness of Fireworks, but it costs a lot less. Specialized apps like Ulead's $45 GIF Animator can be a great help, too.

One of the newest tools in the Web designer's arsenal is Macromedia's Flash 5 ($399), a vector-graphics program that produces animation files small enough to download quickly over a 56-kbps modem.

From here to there with FTP: Most browsers and HTML editors provide some type of FTP capability, but you may find that it's simpler and more effective to use an FTP client program such as Ipswitch's $40 WS_FTP Pro 7. A free WS_FTP Limited Edition has nearly all the functionality of the Pro version, but it's available only for noncommercial use.

The Importance of Being Compliant

The terms HTML and standards have had little to do with each other in recent years. Internet Explorer, Netscape, and other browsers have gradually added their own nonstandard HTML elements, though the most recent versions of the major browsers are far more standards-compliant than their predecessors.

Still, people have used a hodge-podge of standard and nonstandard HTML to create Web sites, and developers haven't felt the need to work in compliance with the most recent standards: HTML 4.01 and XHTML. Little of the code generated by HTML editors complies with either standard, and typically Web pages that don't comply still display in most browsers just fine, even if they include tags such as <font> and <center> that have been deprecated and are no longer standard HTML.

So why comply? XML. The Extensible Markup Language promises to integrate Web content with corporate databases and other non-Web-based data quickly and seamlessly. The future of the Web is clearly XML, so if you want to be ready for it, make sure your site is XHTML-compliant.

The Future Is CSS

Before you write your first <html> tag, you have another standards-related question to answer: Should you position your page elements using tables or Cascading Style Sheets? Both approaches have advantages and disadvantages.

Tables have long been the Web designer's method of choice for ensuring that text, graphics, navigation elements, and other page components display correctly in the many types and versions of browsers that run on site visitors' machines.

The tables are rarely obvious to site visitors (unless they view the page's source code) because nearly all are coded to be borderless: Within the HTML <table> tag, the site designer sets the "border" attribute to "0". Specifying values for the "colspan" and "rowspan" attributes of the <tr> (table row) tag allows the contents of a table cell to span several columns and rows, which makes the intermingling of table elements look seamless.

This approach to Web design has served developers well, but tables have two big problems: First, search-engine spiders--the programs that scan Web sites and index their contents for retrieval in the engines--usually don't read a table's text and image tags (the text descriptions of a page's images, which all conscientious Web designers place within <alt> tags for the benefit of people who browse with images turned off). Second, tables wreak havoc in the browsers used by sight-impaired Web-site visitors, rendering a Web page's contents all but meaningless.

You can overcome the search-engine indexing problem by using the "Description" and "Keyword" metatags inside your page's <head> tag. The second problem is a bit trickier to solve.

Many Web developers create a second version of their sites for nonstandard browsers, including those used by handheld computers, cell phones, and other mobile devices. Then they embed code in their pages to determine the type of browser a visitor is using and to redirect people working with a nonstandard browser to the alternative page automatically.

Coding with Cascading Style Sheets is actually easier than coding a table in HTML, and with CSS you can position page elements both absolutely and in relation to other elements on the page.

So why don't Web developers just use CSS? Because CSS isn't supported in Internet Explorer and Netscape browsers prior to version 4. It's easy to say that people should just upgrade their browsers, but not everyone can. Many people still use 386-, 486-, and Pentium-based PCs running Windows 3.1 or 95, and the newer browser versions don't work on all of these systems.

The Web Standards Project has begun an initiative to encourage people designing Web sites to support CSS2 (the latest version of the standard) and to redirect visitors who are using noncompliant Web browsers to the Web Standards Project site. There they'll be given instructions on how to upgrade their browser.

The Web Standards Project site also contains advice for site designers and supplies blocks of code for automatically redirecting people using non-CSS-capable browsers to the upgrade instructions, as well as code for identifying visitors with noncompliant browsers and alerting them that they won't see the page as it was designed to be viewed.

Subscribe to the Daily Downloads Newsletter