Skip to main content.

Web Based Programming Tutorials

Homepage | Forum - Join the forum to discuss anything related to programming! | Programming Resources

The Complete Idiot's Guide to Creating an HTML Web Page

Chapter 2 -- It's a Wonderful World Wide Web

Chapter 2

It's a Wonderful World Wide Web


CONTENTS



Before you go off half-cocked and start publishing pages willy-nilly on the World Wide Web, it helps to have a bit of background on what the Web is all about. After all, you wouldn't try to set up shop in a new country without first understanding the local geography and customs and learning a few choice phrases such as "I am sorry I insulted your sister" and "You don't buy beer, you rent it!"

This chapter introduces you to the Internet as a whole and to the World Wide Web in particular, takes you through some Web browser basics, and more.

The Internet Nitty-Gritty

Before you can appreciate how the World Wide Web works, you need to step back and look at the big picture: the Internet itself. First off, I'll get the boring definition of the Internet out of the way: the Internet is (yawn) an international collection of networks.

Okay, so what's a network?

Good question. A network is a collection of two or more computers (usually dozens or hundreds) connected via special cables so they can share stuff like files and printers. Large organizations such as universities, research labs, and corporations typically own these networks. The Internet's job, in a nutshell, is to connect these networks together using high-speed phone lines, fiber optic cables, or, occasionally, satellite links.

Hmmm. So could you say that the Internet is a connected collection of collected connections?

Well, you could say that, but you'd just make everyone's head hurt. A network of networks is probably the simplest way to look at it. If an analogy would help, think of the Net as a giant city where the houses are computers. A neighborhood where the houses are connected with side streets is like an individual network connected via cables. In turn, each neighborhood is connected to other neighborhoods via larger roads and avenues or, for longer trips, by highways and expressways. (Insert your own cheesy information- superhighway metaphor here.)

The point is that in any city you can get from your house to any other house by traveling along a particular set of streets, roads, and highways. The Internet works the same way: you can "travel" to other computers on the Net by "following" the various communications lines that make up the Net's infrastructure. (The real good news is that you can do this even if, like me, you have a lousy sense of direction. You just tell your software where you want to go, and it picks out the best route automatically, behind the scenes.)

Sounds good, but what if I don't belong to one of these big-time schools, labs, or corporations that have their networks jacked in to the Internet?

Ah, that's where the service providers come in. These are businesses that set up an Internet connection and then sell access to any Dick or Jane who needs it. You pay a fee (it's often an hourly rate, but you can get monthly or yearly fees that give you a certain number of hours per month), dial in with your modem, and start surfing.

Redefining the Internet

This dull "network of networks" definition is okay for starters, but it really doesn't describe the Internet as it exists today, or capture the diversity, the utility, or the frustration of this most complex of human creations. It also tells us nothing about why the Net holds such fascination for computer pros and amateurs alike. Here, then, is a more realistic definition of the Internet:

The Internet is a means of communication. This is the big one for my purposes in this book. Many Internet types are only interested in perusing the wonders of the World Wide Web, and the Web is (as you'll see) the most attractive way to communicate your ideas to the world at large. I'll talk more about this later in this chapter (and, indeed, throughout the rest of this book).

The Internet is an information resource. To say the least. The Internet has literally millions of computers that are jammed to the hilt with documents, books, pictures, and other information resources. Whether you're researching a thesis or just have an unquenchable thirst for knowledge, the Internet has something for you. (Be forewarned: these resources are so vast and so poorly organized, the patience of a saint is a real asset when looking for things on the Net.)

The Internet is a warehouse. If you scour your own computer, you'll probably find a few hundred or even a few thousand files scattered here and there. Imagine all those files multiplied by the millions of Net computers; this gives you some idea of the massive numbers of documents, graphics, sounds, and programs stored around the Internet. Happily, there are a number of tools (some of which I describe later in this chapter) that you can use to locate and grab these files.

The Internet is a community. Behind everything you see on the Internet-the messages, the documents, the software-stands the person (or persons) who created it. Untold numbers of Net enthusiasts have spent countless hours assembling information, writing software, and answering questions. Amazingly, all this toiling in obscurity somehow managed to create a massive structure that works (most of the time) without the need for any semblance of central authority or governing body. Having said that, however, I don't want to be accused of viewing the Net through rose-colored glasses. Any endeavor that boasts millions of participants is bound to attract its fair share of bozos, buttheads, and bellyachers. Hey, that's life. Overall, though, the Net denizens you'll encounter will be surprisingly helpful and generous and only too willing to engage in random acts of senseless kindness.

An Overview of the Internet Services

Although this book concentrates primarily on the World Wide Web, I'll still need to talk about the other Internet services from time to time. Just to make sure we're always on the same page, let's review some of the available services you can use to interact with the various parts of the Internet:

E-mail  E-mail (or electronic mail) is, by far, the most widely-used Internet service. Every day, untold millions of messages are whisked around the world to digital mailboxes in just about every country on the planet. These days, you're just not "wired" (which, in the modern world, has become a synonym for "hip" or "cool") if your business card doesn't sport an e-mail address. As you'll see in Chapter 7 "Making the Jump to Hyperspace: Adding Links," it's possible to set up your Web pages to include a link that enables people to e-mail you directly from the page.
FTP  FTP (short for File Transfer Protocol) is the most common way to bring files from a particular Net locale onto your computer. You'll almost always use anonymous FTP to log in to the other computer (using the name anonymous and your e-mail address as your password).
Usenet  Usenet is a collection of topics available for discussion. These discussion groups (or newsgroups, as they're normally called) are open to all, and they cover everything from Amazon women to Zima.
Gopher  A Gopher is a system that displays Internet documents and services as menu options. You just select a menu choice, and the Gopher either displays a document or another menu, or transfers you to a different Gopher.
Mailing Lists  This is a system that sends out regular e-mail messages related to a specific topic. For example, if home beer making is your thing, then you'd definitely want to subscribe to the Homebrew mailing list to get things like recipes, how-to articles, beer festival announcements, and more. You usually subscribe by sending an e-mail message to the list's subscription address. You can also post messages to the other members of the mailing list.
Telnet  This is a program that enables you to log in to another computer on the Internet and use its resources as though they existed on your machine. For example, you can often telnet to a library's computer to use the electronic version of its card catalog.

Where to Go for More Info
If you're interested in learning more about some of these Internet services, Que has lots of books that can help. In particular, I highly recommend either The Complete Idiot's Guide to the Internet or The Complete Idiot's Guide to the Internet for Windows 95, both by Peter Kent.

The Net's Wunderkind: The World Wide Web

The services I mentioned above are important Internet underpinnings, but, with the exception of e-mail, they all take a backseat to the Net's current fave rave: the World Wide Web. (If "World Wide Web" is too much of a mouthful for you, the accepted short form is, simply, "the Web." In writing, you'll also see the Web referred to as W3 or WWW. The latter is still a bit of a tongue-twister, so you'll sometimes hear people pronounce WWW as "triple-dub.")

To demonstrate how popular the Web has become, let me give you a for-instance from the pages of Wired magazine, that unofficial arbiter of all that's too-hip-for-words among the digerati. Wired has a section called "Net Surf" that lists various interesting Internet sites. I checked an early issue of Wired from a couple of years ago, and "Net Surf" had 14 listings: four FTP sites, four Usenet newsgroups, one e-mail address, one mailing list, and four listings related to minor Internet services. However, the "Net Surf" section in the most recent issue of Wired had the same number of entries, but every one of them was a World Wide Web site! In other words, even Internet veterans are more or less ignoring the rest of the Net in favor of the Web.

The Secret of the Web's Success

What accounts for the Web's Elvis-like level of popularity? Well, I can put my fingers on a bunch of reasons, but I think three in particular are worthy of note: handsomeness, hypertext, and HTML (I call this the HHH of the WWW).

Handsomeness? Sure. When some Net brainiacs got together a few years ago to design the systems that would transport Web pages hither and thither, they were smart enough to anticipate the coming multimedia revolution. In particular, they didn't restrict Web pages to mere text. Instead, they made it possible for pages to contain pictures, fancy fonts, clickable buttons, and more. Depending on the browser software you use to access the Web, pages can be a real feast for the eyes and ears.

Hypertext? Sounds like text that's had one cup of coffee too many, but what's it really about? Well, let's look at an example. Throughout this book I'll be telling you about other chapters that are relevant to whatever I'm currently talking about. For example, I might say something like "For more info on the amazing Web watchamacallit, see Chapter 57." Wouldn't it be nice if you could just touch the reference to Chapter 57 and have the book open automatically to the correct page?

That's just what hypertext does. Hypertext is a special word or phrase in a Web page that acts as a link to other Net goodies (such as a different Web page). When you select the link (usually by clicking on it with your mouse), the linked resource automatically appears on your computer. Any word or phrase can be designated a hypertext link. Heck, there's no reason the link even has to be a word or phrase-a picture or button does just as well. There's also no reason why the link should point only to other Web documents. Why not use the link to start a Telnet session, FTP a file, or even access a Usenet newsgroup? As you'll see, the Web can do all this and more.

HTML? This, of course, is what this book is all about. HTML stands for HyperText Markup Language, and it's what you use to design Web pages. It sounds like scary stuff, but it's really just a relatively small set of symbols that determine the look and feel of a Web page. I'll discuss HTML in more detail in the next chapter.

Some Web Words to Surf By

Like all Net services, the Web has its own vernacular and acronyms. To help you out as you work through this chapter and the rest of the book, here's a rundown of some common Web jargon (see "Speak Like a Geek: The Complete Archive," at the back of this book, for a larger list of Internet and Web lingo):

browser  The software you use to display and interact with a Web page. When cobbling together your own pages, you need to bear in mind that there are two kinds of browsers: those that display only text and those that support graphics and other fun elements. I'll talk more about this distinction as you work through Part 2.
form  A Web document used for gathering information from the reader. Most forms have at least one text field where you can enter text data (such as your name or the keywords for a search). More sophisticated forms also include check boxes (for toggling an option on or off), radio buttons (for selecting one of several options), and push buttons (for performing an action such as submitting the form over e-mail).
home page  The first Web document that appears when you follow a link to a Web server (see Web server).
hosting provider  A company that, for a (usually) small fee, will publish your pages on the Web.
hyperlink  Another name for a hypertext link.
publish  To make a Web page available to the World Wide Web community at large.
surf  To leap giddily from one Web page to another by furiously clicking on any link in sight.
URL (Uniform Resource Locator)  A Web addressing scheme that spells out the exact location of a Net resource. I'll talk more about URLs in Chapter 7 "Making the Jump to Hyperspace: Adding Links."
Web server  A program that responds to requests from Web browsers to retrieve resources. This term is also used to describe the computer that runs the server program.

Browsing Basics, Featuring Netscape Navigator

When Netscape Navigator was first released to the Net community in the fall of 1994, it immediately caused a huge sensation. Here was a new Web browser that came in lots of different flavors (Windows, Macintosh, and Unix), was faster than anything else around (especially with the modem-based Internet connections that many of us use), came with built-in newsgroup access and basic e-mail capabilities, and was as slick as a nude Jell-O wrestler.

Word of this hot new browser spread around the Net like wildfire, and now Netscape is, by far, the number one Web browser. This section uses Netscape to introduce you to some basic Web browsing techniques.

Getting Your Hands on Netscape

To get a copy of Netscape, you need to use the Internet's FTP service. There are two ways you can go about this:

If you have Windows and a SLIP or PPP connection to an Internet service provider, you can use the WS_FTP program that comes on this book's disk. When the program asks you for a profile name, select Netscape Comm.
If you're using some other FTP program, go to ftp.netscape.com and then head for the /netscape directory.

After you're inside Netscape Communications' FTP site, you need to pick the location that corresponds to your computer: mac, unix, or windows. Each directory has a "README" text file that will tell you the file you need, how to decompress the file, and how to install the program.

The Best Things in Life Aren't Always Free
Keep in mind that, unless you're a student, educator, or member of a non-profit institution, Netscape isn't free. You can download and evaluate the product at no charge, but if you plan on using it regularly, you'll need to lay out some cash. (At the time of writing, Netscape cost $44.95.)

A Tour of the Netscape Screen

When you crank up Netscape (SLIP and PPP users should establish the connection to their service provider first), the program heads for the Netscape home page, as shown next (this page changes constantly).

The Netscape home page.

Here's a summary of the main features of this screen:

Title bar  The top line of the screen shows you the title of the current page.
Toolbar  These buttons give you point-and-click access to some of Netscape's main features. If you prefer to hide the toolbar (because, say, you like more screen real estate), pull down the Options menu and deactivate the Show Toolbar command.
Location field  This area shows you the URL of the current document. If the document is being delivered by a Netsite server (Netsite is the Web server software developed by Netscape), this field is labeled Netsite (as shown in the previous figure). For all other Web servers, the label says Location. If you're entering text into the field (as explained later), the label changes to Go to. You can hide this field (and give yourself more room) by pulling down the Options menu and deactivating the Show Location command.
Directory buttons  More point-and-click stuff. Here, these buttons give you easier access to the commands on Netscape's Directory menu. (I'll talk about them a little later.) If you want to hide these buttons, deactivate the Show Directory Buttons command on the Options menu.
Image map  Unlike most Web page graphics which are just for show, these are "clickable" images that take you to a different link, depending on which part of the image you click.
Content area  This area takes up the bulk of the Netscape screen, and it's where the body of the Web document appears. You can use the vertical and horizontal scroll bars to see more of the current document.
Links  Links to other documents (or to other places in the same document) appear underlined in a different color. You select a link by clicking on it.
Status bar  This bar lets you know Netscape's current status, and it tells you the progress of the current Netscape operation.

Okay, now that you're familiar with the lay of the Netscape land, you can start using it to navigate the Net. The next few sections take you through the various ways you can use Netscape to wend your way through the Web.

Navigator Navigating I: Following the Links

As I've said, Netscape displays hypertext links in an underlined font that's a different color from the rest of the text. To select one of these links, just click on it with your mouse. You end up on a different, yet related, Web page. This page will also have links that you can follow. Before you know it, you will have forgotten where you started!

Image maps work the same way: Position the mouse pointer over the portion of the map you want to see and then click.

Navigator Navigating II: Entering a URL

If you want to strike out for a particular Web site, you can specify a URL using either of the following methods:

Click inside the location field, delete the current URL, type in the one you want, and then press Return.
Either click on the Open button in the toolbar, pull down the File menu and select the Open Location command, or press Ctrl+L. In the Open Location dialog box that appears, type in your URL and then select Open.

Navigator Navigating III: Retracing Your Steps

Once you start leaping and jumping through the Web's cyberspace, you'll often want to head back to a previous site, or even to Netscape's home page. Here's a rundown of the various techniques you can use to move to and fro in Netscape:

To go back to the previous document, either click on the Back button in the toolbar, select the Go menu's Back command, or press Alt+left arrow.
After you go back to a previous document, you move ahead to the next document you went to by either clicking on the Forward button in the toolbar, selecting the Go menu's Forward command, or pressing Alt+right arrow.
To return to the home page, either click on the Home button or select the Go menu's Home command.
To return to a specific document you've visited, pull down the Go menu and select the document's title from the list at the bottom of the menu. (This is a list of the most recent pages you've seen.)

Navigator Navigating IV: Creating Bookmarks

As you navigate the Web, much of what you'll see will be ignorable dreck that's not worth a second surf. However, there are plenty of gems out there waiting to be uncovered-sites that you'll want to visit regularly. Instead of (shudder) memorizing the appropriate URLs or jotting them down on endless sticky notes, you can use Netscape's handy Bookmarks feature to keep track of your choice sites.

Using bookmarks is simplicity itself: when you discover a Web page that you think you'll want to resurf, pull down the Bookmarks menu and select the Add Bookmark command (or press Ctrl+A). That's it; no muss, no fuss. Now, when you want to return to a particular bookmarked page, pull down the Bookmarks menu and select the page's title from the list that appears at the bottom of the menu.

Browsers: The Best of the Rest

Netscape, of course, isn't the only browser game in town. With the World Wide Web the Big Deal that it is, you better believe that all kinds of software companies are jumping on the browser bandwagon. So, for the sake of giving equal time (sort of) to these pretenders to the throne, this section looks at the few browsers that you can consider as Netscape's peers.

Netscape: The Web's De Facto Standard
Yes, there are lots of other browsers out there, but you'd never know it. I'd say anywhere from a third to a half of all the Web sites I visit say something like Optimized for Netscape on their home pages. What does this mean? Well, as you'll learn in Chapter 10, "Fooling Around with the Netscape Extensions," Netscape brings a few fancy features to the HTML table (such as tables and cool background textures). Optimized for Netscape means that the page designer has used these so-called Netscape extensions to enhance their site and that you need to be browsing with Netscape Navigator to get the full effect.

Unfortunately, the proverbial space limitations prevent me from giving a detailed treatment of each browser. Instead, I'll only give you a "just the facts" description for each program:

NCSA Mosaic (Windows, Mac, Unix)
Company:National Center for Superconducting Applications
Where to find it:FTP-ftp.ncsa.uiuc.edu
Directories:/Web/Mosaic/Windows/Win3x
/Web/Mosaic/Windows/Win95
/Web/Mosaic/Windows/WinNT
/Web/Mosaic/Mac
/Web/Mosaic/Windows/Unix
Comments:The original Web browser and still a formidable competitor to Netscape (see the next figure). Make sure you read the instructions before installing Mosaic.

The old veteran: NSCA Mosaic.

Internet Explorer (Windows 95)
Company:Microsoft
Where to find it:WWW-http://www.microsoft.com/ ie/iexplorer.htm
Comments:A top-notch browser with all the bells and whistles (see the following picture). Perhaps the only browser that really challenges Netscape.

One of the new kids on the Web block: Microsoft's Internet Explorer.

Emissary (Windows 3.1)
Company:The Wollongong Group
Where to find it:FTP-www.twg.com/pub/emissary
Comments:The Swiss army knife of browsers. Emissary combines the Web, e-mail, Usenet, FTP, and more into a single package (as shown in the following figure). All this usefulness will cost you: the Wollongongians charge $99.95 for Emissary.

SPRY Mosaic (Windows 3.1)
Company:CompuServe/Spry
Where to find it (I):CompuServe-Go: Internet
Where to find it (II):FTP-ftp.spry.com/AirMosaicDemo
Comments:Spry licensed Mosaic from the NCSA and put out their own version of the browser. Then CompuServe bought Spry and introduced NetLauncher, their Internet dialer and browser package (the next figure shows the CompuServe version of SPRY Mosaic). It's a decent program, but it's not in Netscape's league.

One stop Net surfing: Emissary.

CompuServe's entry in the Web browser sweepstakes.

America Online (Windows 3.1, Mac)
Company:America Online
Where to find it:Keyword: World Wide Web
Comments:Not to be outdone by CompuServe, America Online (AOL) recently added a Web browser to their Internet offerings (see the next figure). It's a competent program, at best, and its nicest feature is its integration into the AOL interface.

The America Online Web browser.

PRODIGY (Windows 3.1)
Company:PRODIGY
Where to find it:Jump: Web Browser
Comments:Everybody else is doing it, so why can't we? PRODIGY's browser has all the standard features (see the following figure), but not a lot of pizzazz (sort of like PRODIGY as a whole).

PRODIGY's (yawn) Web browser.

The Least You Need to Know

This chapter prepared you for the HTML ordeal to come by taking you on a 50 cent tour of the Internet and the World Wide Web. You saw, for example, that the Web has become insanely popular in the last couple of years (to the point where the terms "Internet" and "World Wide Web" have become nearly synonymous). The reasons behind this surge in popularity are the HHH of the WWW: handsomeness, hypertext, and HTML. I also ran through a few Web words, such as browser, surf, and URL. Speaking of browsers and surfing, I also showed you how to surf the Web using the Netscape Navigator browser as an example.