Subject: Creating web pages III From: Jim Buchanan <c22jrb@dawg.delcoelect.com> Reply-To: <delco_explorers@hybiss.delcoelect.com> X-List-Processor: perlproc 0.9, By J.R. Buchanan X-Comment: Delco Computer Explorers mailing list Sender: delco_explorers@hybiss.delcoelect.com
The last time through, we created and viewed an HTML file under Windows. Now let's do it under Linux. Overall, it's pretty much the same.
In Windows, we talked about one text editor, but two web browsers. Here we'll talk about two text editors, emacs and vi, and one web browser, Netscape.
First we'll do emacs, which stands for "Editing Macros".
Start emacs. You'll probably do that from the command line by typing "emacs".
Type in the web page:
<html> <head> <title>A demonstration web page</title> </head> <body> This is a test. </body> </html>
Now save the file in a convenient directory. Type "control-X"-"control-W", and then type in the directory and file name to save the web page as. I used "foo.html". I used "temp" for the directory.
When you're sure you're done, you can leave emacs by typing "control-X"-"control-S".
If you have to create a new directory, use the "mkdir" command. Type "mkdir temp" to create the directory "temp" in the current directory. That was sure easier than it was under Windows...
Now we'll try it under vi, which stands for "Visual". It's the most commonly used text editor under Unix/Linux. emacs is second, and my favorite.
Start vi. You'll probably do that from the command line by typing "vi".
Enter insert mode by typing "i" and "Enter".
Type in the web page:
<html> <head> <title>A demonstration web page</title> </head> <body> This is a test. </body> </html>
Now save the file in a convenient directory. Enter command mode by pressing "Esc". Then save the file by typing ":w file_name". I used "foo.html" in the temp directory again.
When you're sure you're done, you can leave vi by typing ":q" in command mode.
To view the page,start Netscape, probably by typing "netscape &" on the command line.
In the "Location:" window, type in "file:/" followed by the file name. I used "file:/home/jbuchana/temp/foo.html", since that's where I saved the file to. Notice that Netscape wanted a full path name, starting at your root directory. Of course, I did the same thing under Windows, but path names tend to be a bit longer under Unix/Linux. Oh well, you can always browse for the file from Netscape's "File" menu.
Next, we'll make the really basic web page a bit more interesting.
-- Jim Buchanan c22jrb@dawg.delcoelect.com jbuchana@iquest.net ================= http://members.iquest.net/~jbuchana ==================== "Remember that if computers are networked, they can talk to each other. That is useful when you make an example of one." -ASR faq ==================== http://hybiss.delcoelect.com ========================