Getting Started

There are basically two ways to make web pages. The first way is to create them offline and then upload them to your Internet Service Provider (ISP) via FTP. The second way is to create your web pages online using a Telnet program by accessing your UNIX account, if you have one.

If you are creating your web pages offline, do so in any text editing or word processing document. Make sure that when you save your document, you save it as a "text", "plain text" or "text only" document. Otherwise it will not be read properly by a web browser. Once you have created your pages you will need to contact your ISP about how to go about uploading them to your server.

If you have a UNIX account, you can create your web pages online. You need to first telnet into your account.

Once you can access your account, you need to make a new directory called "public_html". You can do this by typing:

mkdir public_html

After this, change your directory to this new directory called "public_html".

cd public_html

If you want to, you can make other directories, one for all the web pages that you make, and one for all of the graphics that you have. Follow the same steps as above to do this.

Next, you need to think of a filename for your page (this is not a title, but the name of the URL). A common filename for a main web page, is "index". Once you've decided on this, add ".html" to the end of it. You can then edit it using a Unix editor like pico

pico index.html

Of course, use your page's filename, instead of this one. Once you've gotten started, exit your page. You can do this by pressing control-x. Then you need to type:

chmod index.html

Use the filename of your page with this comand. You only need to do this the very first time that you leave your web page. This command will make sure that nobody else can delete your page. You will need to do this to any other pages you add in the future. Then, look at your page on the WWW. Lets say that your server is "cs.wpi.com" , your username is "rahulb", and the name of your page is "index.html". The URL would normally be:

http://cs.wpi.com/~rahulb/Content.html

However, you will need to contact your ISP for your URL.

If you have made separate directories for pages and graphics, then you need to include that in the URL also. Lets say that you made a directory for all of your web pages, called "Pages". The new URL would be: https://rahulbhattacharya.tripod.com/Pages/index.html

Title

The first thing to put on your web page, is a title. The title is what will show up in the very top of the window. Let's say that your title is going to be "John Doe's Web Page", you would type:

<title>John Doe's Web Page</title>

In HTML, every command is surrounded by <'s, and >'s. And in most commands, you need to tell the web browser when to end this command. You do this by putting a back slash (/) in front of the ending command, as in above. Since HTML isn't case sensitive, <title> is the same as <TITLE>, which is the same as <TiTLe>. Next, you need to decide what you want to put on your page. Text, links, graphics, and text fields, are just a few ideas. Follow the table of contents above to decide how, and what to put on your page.

 

Text

 

Headings

HTML has six levels of headings, numbered 1 through 6, with 1 being the largest. Headings are displayed in larger, or smaller fonts, and usually bolder. If you wanted to use the word "Hello" as your heading, this is what you would type for each heading, and what the outcome is:

<h1>Hello</h1>

Hello


<h2>Hello</h2>

Hello


<h3>Hello</h3>

Hello


etc.

Paragraphs

Whenever you have more than a sentence of writing, you should have paragraphs. To Make a paragraph of "This is a web page. How do you like what I've done? Please e-mail me with any suggestions at a@a.com", type:

<P>This is a web page. How do you like what I've done? Please e-mail me with any suggestions at a@a.com</P>

The outcome is:

This is a web page. How do you like what I've done? Please e-mail me with any suggestions at a@a.com

 

Lists

There are two types of lists that you can make in HTML, dotted, and numbered. To make a dotted list of: red, orange, green, blue, purple, black, and brown, type:

<UL>
<LI> red
<LI> orange
<LI> green
<LI> blue
<LI> purple
<LI> black
<LI> brown
</UL>

The result is:

To make a numbered list of: red, orange, green, blue, purple, black, and brown, type:

<OL>
<LI> red
<LI> orange
<LI> green
<LI> blue
<LI> purple
<LI> black
<LI> brown
</OL>

The result looks like:

  1. red
  2. orange
  3. green
  4. blue
  5. purple
  6. black
  7. brown

 

Forced Line Breaks

There are many cases in which you want to end typing on one line, and start on the next. To do this, you can use a simple HTML command. This is one of the few commands that you don't have to put an ending command on. Let's say that you wanted to say "Hello, how are you?", but with each word on a separate line. All you have to type is:

Hello,<BR>how<BR>are<BR>you?

The outcome is:

Hello,
how
are
you?

Horizontal Rules

Every now and then, you might want to have a horizontal rule, or line in your page. Horizontal rules can be many different sizes and lengths. You can also have the line be solid black, by typing NOSHADE. Here are several examples of sizes and widths, and what the outcome is:

<HR SIZE=1 WIDTH=100%>


<HR SIZE=5 WIDTH=50%>

<HR SIZE=25 WIDTH=75%>

<HR SIZE=3 WIDTH=100%>

<HR NOSHADE SIZE=1 WIDTH=100%>

<HR NOSHADE SIZE=3 WIDTH=100%>

<HR NOSHADE SIZE=10 WIDTH=20%>

Character Formatting

You may want to format some of your text differently than others using text styles. There are several types of styles of text that you can use: bold, italic, underline, strikeout, superscript, subscript, teletype, and blinking text are examples. To do these styles, surround your text with the following commands:

<b>, </b> for bold

<i>, </i> for italic

<u>, </u> for underlined

<strike>, <strike> for strikeout

<sup>, </sup> for superscript

<sub>, </sub> for subscript

<tt>, </tt> for teletype

<blink>, </blink> for blinking text (very annoying)

You can also mix styles together like this!

 

Linking

 

URLs

When you make a link, you are connecting a piece of text or even a graphic to a different web page. When a user clicks on this link, it will take him to another web page, or possibly a certain section of a web page. Let's say that you wanted to make a link from your web page, to this page. The URL of this page is:
https://rahulbhattacharya.tripod.com/Content.html
To do this, you would type:

<A HREF="https://rahulbhattacharya.tripod.com/Content.html">The linkable text goes here</A>

The result would be:

The linkable text goes heree

Links to Specific Sections

Sometimes, you might want to have a link that will take you further down a page, or to a certain section of another page. An example of this is the index to this web page. You click on the colored text, and it takes you to that section. To do this, you need to do two things. The first, is to make the link, and the second, is to make where the link will lead to. NOTE: You cannot make links to specific sections within a different document unless either you have write permission to the coded source of that document or that document already contains in-document named links.
1) To make the actual link, think of a name for the certain spot. Let's say you are going to call it "spot". If this certain spot is on the same page that the link is, you would type:

<A HREF="#spot">Colored Text

Otherwise, you would add "#spot" to the end of the URL.
2) Now, you need to make where the link will take you. Go to the spot where you want the link to take you, and type:

<A NAME = "spot">

Mailto Links

Most people like to have a link on their web page that automatically sends e-mail to an address. If you want to do this, and your name is Rahul, and your e-mail address is a@a.com, type:

<A HREF="mailto:a@a.com">Rahul</a>

Here is the result of typing this (click on it to send me e-mail).

Rahul

Graphics

 

Putting Images On A Page

There are mainly two kinds of ways to have graphics on your web page. The first, is to use a graphic that is on another web page somewhere on the web. The second, is to upload the graphic to your own account. Personally, I prefer to use the upload method. If you are using the other way, there is always a chance that the person who made that page will decide to delete that graphic. Then a symbol with either a square and a cross or a torn page (Depending on what browser you use) will appear where the graphic was supposed to be.


To display a graphic on some one else's page, you need to find the URL. To do this, I recommend that you have Netscape Navigator. Right click or click and hold down on the graphic, until a menu comes up. Choose "View this Image". Then , copy the URL that appears at the top of the screen, in the "location" box. Let's say that the URL was: https://rahulbhattacharya.tripod.com/ball.gif You would type:

<IMG SRC="https://rahulbhattacharya.tripod.com/ball.gif">

The result is:


To display a graphic that is in your account, all you have to do is type in the filename. If you didn't make separate directories for graphics and pages, then you just need to type the graphic's name.(i.e. <IMG SRC="ball.gif">

 

Alternate Text for Images

Some World Wide Web browsers cannot display images. Some users turn off image loading even if their software can display images (especially if they are using a modem or have a slow connection). HTML provides a command to tell readers what they are missing on your pages. The "ALT" attribute lets you specify text to be displayed instead of an image. For example:

<IMG SRC="ball.gif" ALT="How to make a web page">

In this example, "ball.gif" is an animation of a spinning ball. With graphics-capable viewers that have image-loading turned on, you see the graphic. With a non-graphic browser or if image-loading is turned off, the words "How to make a web page" is shown in your window. You should try to include alternate text for each image you use in your document, as it is a courtesy for your readers.

 

Background, text, and link Color

On most pages, you want to have a specific color for the background, text, unvisited links, visited links, and active links. In order to do this, you need to find the code number for the specific color that you are looking for. Here is a HUGE list of code numbers, and here is how you would display this in your page. NOTE: Type these ONLY right below your title. NOTE: You must have the "#" sign before the actual code.

You can also string two or more of these commands together:

<body bgcolor="#000015" text="#000020" link="#000050" vlink="#7a7777" alink="#8f8e8d">

Background Graphics

Instead of having a solid color as a background, you might want to have one graphic that repeats over and over to create a background. Here are several places that you can go to find background graphics. The text that you would type in for a background called "bk.gif" would be:

<body background="bk.gif">

Linking with graphics

Sometimes on your web page, you might want to have a graphic that is a link. This is quite simple, since you just mix the two commands of linking, and displaying graphics. Here is an example of a graphic that leads to Yahoo:


You can also have a text link next to the graphic that leads to the same place.

Yahoo!

Here is what you would type in for, first the plain graphic-link, and second, the graphic-link with text:

<A href="http://www.yahoo.com"><IMG SRC="http://us.i1.yimg.com/us.yimg.com/i/yahoo.gif"></A>

<A href="http://www.yahoo.com"><IMG SRC="http://us.i1.yimg.com/us.yimg.com/i/yahoo.gif">Yahoo!</A>


Image Maps

Before you create an image map, you need to make sure that your server supports them. Then, you can follow these steps. First, you need to create an image. Draw a picture with sections that could lead to certain places. Second, you need to create an image map file. There are several programs that can do this for you. I recommend WebMap, for the Mac. You can go to Yahoo's Image Map Directory for others.

 

Fill-out Forms

 

Getting Started

Fill-out forms let a reader return information to a Web server for some action. For example, you could be collecting information about people using your website and sending them an automatic email response based on their input. This processing of incoming data is usually handled by a script or program written in Java Script, Perl or another language that manipulates text, files, and information.

A detailed introduction to scripting languages is beyond the scope of this webpage, but you can refer to the links at the bottom of this page to learn how to manipulate user input.

Form Method/Action

The first thing that you type for when using a form is the Form Method and Action. This is where you tell the form where the script it is linked to resides. Most servers and Internet Providers have scripts like https://rahulbhattacharya.tripod.com/TripodMail.pm that they provide for you. Check with yours. You cannot practically use a form without having a script behind it to process the input. The address of the one that I'll be using is: https://rahulbhattacharya.tripod.com/TripodMail.pm

<FORM METHOD="POST" ACTION="https://rahulbhattacharya.tripod.com/TripodMail.pm">
<INPUT TYPE="input" NAME="recipient" value="a@a.com">TO:<P>

Here is what it will look like:

TO:


Next, you need to decide what questions you want to ask, and what you will use to ask them. Before you start, you might want to check with your server to see if they have any questions that you MUST ask. You can use single or multiple text fields, larger fields, checkboxes, radio buttons, pull-down lists and scroll-down lists.

 

Single or multiple fields

In your guestbook you might want to ask questions that have a one word answer. Here is what you would type to have four fields that ask for an email address, a first name, a last name, and a subject:

<INPUT TYPE="input" NAME="from">Your Email Address<P>
<INPUT TYPE="input" NAME="firstname">Your First Name<P>< /FONT>
<INPUT TYPE="input" NAME="lastname">Your Last Name<P>
<INPUT TYPE="input" NAME="subject">Subject<P>< /FONT>

Here is the result:

Your Email Address

Your First Name

Your Last Name

Subject


Larger Fields

You would often require one larger field at the end of your form for comments or feedback. You first need to decide how many columns and rows that you want to have. Let's say that you want to have 7 rows, and 45 columns. Here is what you would type:

Please place any questions or comments here:
<TEXTAREA Rows=7 Cols=45 NAME="suggestions"></TEXTAREA><P>

Here is what the result looks like:

Please place any questions or comments here:

 

Checkboxes

Let's say that you wanted to ask a question like "What are some things that you like to do?" You could have a list of things with checkboxes. If you wanted the list to be: Watch TV, play on the Internet, read a book, play sports, and study, you would type:

What are some things that you like to do?

<INPUT TYPE="checkbox" NAME="like" VALUE="TV">Watch TV<P>
<INPUT TYPE="checkbox" NAME="like" VALUE="internet">Play on the Internet<P>
<INPUT TYPE="checkbox" NAME="like" VALUE="read">Read a book<P>
<INPUT TYPE="checkbox" NAME="like" VALUE="sports">Play sports<P>
<INPUT TYPE="checkbox" NAME="like" VALUE="study">Study<P>

The result:

What are some things that you like to do?

Watch TV

Play on the Internet

Read a book

Play sports

Study

 

Radio Buttons

If you ever want to ask a question with one answer, you can use radio buttons. If you wanted to ask "What WWW browser are you using right now?", and you wanted to have the choices Netscape Navigator 4.x, Netscape Navigator 3.x, Netscape Communicator, Mosaic, and Microsoft Explorer, you would type:

What WWW browser are you using right now?

<INPUT TYPE="radio" NAME="browser" VALUE="Navigator 4.x">Netscape Navigator 4.x<P>
<INPUT TYPE="radio" NAME="browser" VALUE="Navigator 3.x">Netscape Navigator 3.x<P>
<INPUT TYPE="radio" NAME="browser" VALUE="Communicator">Netscape Communicator<P>
<INPUT TYPE="radio" NAME="browser" VALUE="Mosaic">Mosaic<P>
<INPUT TYPE="radio" NAME="browser" VALUE="Internetex">Internet Explorer<P>

The Result:

What WWW browser are you using right now?

Netscape Navigator 4.x


Netscape Navigator 3.x


Netscape Communicator


Mosaic


Internet Explorer


Pull-Down Lists

Another way to ask a question with only one answer is to use a pull-down menu. You can use the SELECTED command to have an option besides the first be selected, as you will see below. If you wanted to ask "What is your favorite color?", and you wanted the list to be of red, yellow, orange, green, blue, purple, black, and brown, with black selected, you would type:

What is your favorite color?
<SELECT NAME="color">
<OPTION>Red
<OPTION>Yellow
<OPTION>Orange
<OPTION>Green
<OPTION>Blue
<OPTION>Purple
<OPTION SELECTED>Black
<OPTION>Brown
</SELECT><P>

The outcome is:

What is your favorite color?

 

Scroll-Down Lists

Some times, you might want to have a scroll-down list on your page. With this, you can decide whether or not you want people to be able to select more that one item. If you do have it with more that one items, the user has to hold down the command or shift key. You can also decide how many of the lines you want visible. Below are two lists of the same things. In the first one, you can only select one item, and it is showing three lines. In the second one, you can select one or more items by holding down command or shift . The second list shows four lines. The question is "What is your favorite video game system?" The answers are: Nintendo 64, Sony Playstation, Sega Dreamcast, or arcade video games. The text that you type for each list is above the actual list.

What is your favorite video game system?
<SELECT NAME="video game" SIZE=3>
<OPTION VALUE="nintendo64">Nintendo 64
<OPTION VALUE="playstation">Sony Playstation
<OPTION VALUE="dreamcast">Sega Dreamcast
<OPTION VALUE="arcade">Arcade Games
</SELECT><P>

The outcome is:

What is your favorite video game system?

What is your favorite video game system? (Hold shift to select more that one)
<SELECT NAME="video game" MULTIPLE SIZE=4>
<OPTION VALUE="nintendo64">Nintendo 64
<OPTION VALUE="playstation">Sony Playstation
<OPTION VALUE="dreamcast">Sega Dreamcast
<OPTION VALUE="arcade">Arcade Games
</SELECT><P>

The second outcome is:

What is your favorite video game system? (Hold shift to select more that one)

 

Reset Form

On most page that have fill-out forms, there is a reset button at the bottom of the form, next to the "submit" or "send" button. To have a reset button, just type:

To reset the all of the forms, press this button:<INPUT TYPE="reset" VALUE="Reset">

The outcome is: (try it!)

To reset the all of the forms, press this button:

Submit Entry

When you are all finished with everything, you need to make a button so that people can submit their entry. To do this, type:

To submit your choices, press this button:<INPUT TYPE="submit" VALUE="Submit">

To submit your choices, press this button:


 

NOTE: At the very end of your form, you must type </FORM> or your forms won't work!!

Links:

Here are some really useful links to help you create a more powerful webpage.

Java Scripts
More on Java Scripts
Web Development