ADVANCED HTML
 
 
Return to Top of Page
Return to Top of Page
Return to Top of Page
Return to Top of Page
Return to Top of Page
Advanced HTML Programming
Using Tables
FORMS
Framing up your site
Adding visual improvements
Building Imagemaps
Multimedia
Go to Beginners Page
Return Home
Using tables will allow you to separate parts of your web site without using frames. There are
several differences between frames and tables. First, Tables are contained in the same HTML page
or file whereas frames is in a separate file. Second, After loading, frames can be contained in
a small portion of your memory but tables use much more of your memory, i.e. Table within a
table. It's like a 2-dimensional array.
Regarding tables, some say it is much harder to code rather than forms. Well, I agree. One mistake
and your table might appear elsewhere or it may not even be shown. Here are the codes to create
your tables in your web pages.
CODE:
<table border="1" bgcolor="white">
<tr> <td> <div align="center">
Hello!
</td>
<td>
How Are you?
</td> </tr>
</table>
OUTPUT:
How Are you?
As you can see it's quite complicated. But it's not that hard. Here's the explanation. First make
the <table> Tag which signifies the beginning of your table. Next, make the
<tr> tag
which adds
1 row to your table and the
<td> tag which adds 1 column to your table. Now you are ready
to insert images and text to your table. Make sure that it is inside the
<td> tag like the example
above. Now terminate the tags by using
</td> </tr> and the </table>
which signifies the end
of your table. And if ever you want to add a column or a row, just insert a new
<td> tag for a
new column, and a
<tr> for a new row. (Tip: Follow the example above.)
Using Forms in your web site makes your site more interactive. You can ask for the users' feedbacks about your site
, ask for information and so on. Well, it's a little easier than Tables. Forms consists of textboxes, Radio Buttons,
Check Boxes, selection lists, submit and reset buttons, and a text area which can be scrolled. Each of these are called
regions of the form. A single form may consists one of each of these regions or more. Always remember that every
region inside one <form> ... </form> tag, are considered as one. If you make a new
<form> tag, it
will be different from the previous one made. Also, information gathered from forms can be managed in 2 ways, either by
your CGI Script which will handle the information or send it through e-mail. Here are the Form tags and their Examples.
STARING YOUR FORM
<form action="mailto:[email protected]" method="post">
.....
</form>
This is the most importannt code in your form (of course!). The "....." part is where you put the tags for the regions of
your form. It is up to you what it will contain. Now, action="..." will determine where will the information be posted (
METHOD="POST" ).
In the given example, it will be sent to the e-mail specified. Here are tags for the regions of your form.
Perhaps this is one of the best ways to present your site. The most common way to
present Frames is the links are on the left frame which is 25% of the page and
all other news or information on the main frame. Creating frame is not that hard.
All you have to do is to create an html document which will call all the other
frames. for example,
( MAIN.HTM )
<HTML>
<HEAD>
</HEAD>
<FRAMESET COLS="25%,75%">
<FRAME SRC="left.htm">
<FRAME SRC="right.htm">
</FRAMESET>
<NOFRAMES>
Your browser cannot display frames.
</NOFRAMES>
</HTML>
MAIN.HTM
Contains the different attributes of your frame. Here's the Explanation:
FRAMESET COLS
means that, your frame contains two columns
25%, 75% of the
screen, left and right respectively. Thus, if you want to create a page
which horizontally divides the screen equally, you'll use the tag
<FRAMESET ROWS="50%,50%">.
Next, FRAME SRC
tag calls the HTML document to be displayed on the frame.
The first frame to be called will be automatically the Left frame for
Vertical Frame, and Right frame for horizontal frames. Finally the
</FRAMESET>
tag signifying the end of the Frame Tag. You now have
a frame!
Making some visual improvements will make your visitors return and admire your
web site. Creating such improvements require A LOT of work. Use this page as an
example. Once your mouse cursor is over a hyperlink, the color changes. Put your mouse
cursor over some links and observe the changes. It's main purpose is to determine
the links available in the web page.
Next, do you see a description of the link in your status bar? It is the horizontal
bar at the bottom of your browser. Try putting the mouse cursor over a link and
observe your status bar. It's coll isn't it. (It's also a way of hiding your link,
but some EXPERIENCED(including me) users will eventually see it). I'm going to
teach you how to do these improvements.
Now this TAG is put before the <BODY>
tag of your document. Here is the Tag to put STYLE in your web page.
<STYLE>
A:LINK {text-decoration:bold;
font-family:times new roman;
font-size:12;
color:blue;}
A:VISITED {text-decoration:none;
font-family:courier new;
font-size:11;
color:green;}
A:HOVER {text-decoration:none;
font-family:Tahoma;
color:red;}
</STYLE>
Now, let's go to the status bar. You can make a description of a link appear in the status
bar of your browser when the mouse cursor is on top of a link. It's easy. Let's have a
comparison.
With out Script:
CODE:
<a href="advanced.htm"> ADVANCED </a>
OUTPUT:
ADVANCED
Now put your mouse cursor over the link above. Examine the status bar. You should see
the exact location of the link. Now let's add something to make a description appear
on the status bar.
CODE:
<a href="advance.htm" onmouseover="window.status='Advanced Page'; return true;"
onmouseout="window.status=''; return true;">
ADVANCED </a>
OUTPUT:
ADVANCED
Not put your mouse cursor on top of the link above. You should see now the description
of the link. "Advanced Page" should be displayed on the status bar. That's simple isn't it.
Just add the onmouseover
attribute to your link for the description to appear. One more thing, do not forget
to add the onmouseout
attribute. If you forgot to place this, the description will
be displayed in the status bar even if the cursor is not on top of the link.
HTML Programming by "A"
�Copyright July 8, 1999