|
Cobbling HTML
Copy(c)right 2001 - 2007 by G.Mike Raymond
Today, anyone can write a home page for the WEB
in 10 minutes. That includes the 10 year old
kid next door who has probably already done it.
Constructing a web page is easily done with the help of
one of several HTML code generator application such as
HomeSite or SpiderWeb. In addition, many free web site
providers such as GeoCities have online "fill in the
blanks", page constructors. While this many be
efficient, it will never help you learn much about HTML
code and how it is used. Learning how to write HTML
(Hyper Text Markup Language) is relatively easy and
very rewarding. Many so called "HTML experts" fall too
easily into the "avoid Click Here" syndrome when
recommending their concept of good HTML prose. I say
be yourself and do what pleases you, and let "your"
specific readers be the judges. Of course, if you are
going to write for a truly world wide audience, then
obeying some protocols might be wiser.
When you surf to a web page using the site's domain
address (or Universal Resource Locator), the first page
to load is the default or "index" page. Typically this
file is named "INDEX.HTML". However this file can be
named anything the Webmaster configures the server to
use. If some other default home page name is required,
it is always mentioned by the web master providing the
service. The extension of HTM or HTML on a web file is
standard but technically not always required.
A web "server" is the software program that renders
your web page content available to the Internet. Most
large operations use a Web server called Apache but there
are many other choices. This includes a number
of Freeware Web Servers such as Abyss and
KeyFocus.
A web server typically
runs on a dedicated computer at the Service Provider's
location or even from your computer at home. Running a
web server on your home computer has many limitations
but it is certainly doable. Interestingly, any computer
dedicated to running server type software is also itself
called a "Server."
In a commercial operation, the web servers hard drive
is setup to use unique folders (directories) to
separate all the various customer's home pages (html
files) from one another. Frequently these folders are
named the same as the customers account name.
An HTML file is just an ordinary text (ascii) file
containing the special HTML Tags that can be typed up
with any ordinary Text Editor or Word processor. A Tag is a
key HTML word or words enclosed in cheveron brackets
like this <FONT color=blue>.
Most HTML files are given the extension HTM or HTML. Once an
HTML file is created and tested it must then be
uploaded to the web servers hard drive using a file
transfer utility known as FTP.
Note: Personal Computers recognize 256 unique
characters comprising something called the American
Standard Code for Information Interchange (or ASCII
table.) The first 128 codes comprise all the standard
english alphabet (both upper and lower case), numbers,
punctuation and formatting or control characters such
as carriage returns and line feeds. Therefore a so
called "Text file" consist of codes or characters from
only the lower 128 characters of the ASCII table.
To recap, when a user on the Internet enters your URL
into his Browser, that URL (Universal Resource Locator)
or web address points to a particular folder and page on the
web server. Frequently your ISP or web host "username"
becomes the last part of your URL.
Note these sample URL's:
&l;http://earthlink.net/~jjones>
&l;http://earthlink.net/members/jjones>
Typically the "jjones" (aside from being the users id)
is a sub folder name on the hard drive of the server
and /members/ or the Tilde ("~") represents the common
folder to the account sub folder.
Remember, the end part of your URL points to the folder
where the home page is located on the host server. The
first part of the URL (the domain) is frequently the
address you use with an FTP client (File Transfer
Protocol program) to upload your HTML files to the web
server you are using. A very popular shareware FTP
client is called CuteFTP.
Example: You would enter "earthlink.net" as the server
address into your FTP client, and "/members/jjones" as
the path, along with your regular username and password
(unless a special username/password was required). Ok,
so you write the code and upload it via FTP to your web
provider, and you are in business. Now lets look at
a few lines of HTML code that create a web page.
FINALLY......Sample code for a home page:
<HTML>
<HEAD>
<TITLE>JJones Home Page</TITLE>
</HEAD>
<BODY>
<PRE>
This is JJones Mini Home Page!!
</PRE>
<center>
This is me! <img src="/imgs/jjones.jpg">
</center>
My favorite <a href="http://www.cnn.com">News Site
</BODY>
</HTML>
The code above stands good as a tiny yet "complete"
home page. For the moment, just note that most every
HTML <TAG> has an ending </TAG>. A very few Tags, like
<P> and <HR>, do not. Also note that Tag Commands
are CaSe-InSeNsItIvE. Most every page is constructed
the same way; starting and ending with the tags of HTML
and BODY.
All that is missing in the above sample is more HTML
froufrou! And it can get a lot more involved. Example, frequently a business page needs to
collect information from a user and process it. This is
done with something called CGI (Common Gateway
Interface) utilities. These are executable programs
loaded by special tags in your HTML code that further
process information provided by page visitors. Perl
is the more common C language for creating CGI apps
but most any win32 compiler can do it. If you are
interested in CGI programming, visit
CGI Resources. Another method of implementing
an interactive web page is with
Java Scripts.
Since its not my intention to demonstrate every meta
tag used in HTML code here, I will leave that to your
personal study. However, here is a site that offers a great
deal of additional beginners Hints
and another for professional
Web Developers. Also see HTML HELP.
One great way to learn HTML is by looking at the source
code of other web pages after you have visited them.
All web browsers allow you to see the HTML source code
of any page displayed and even make a copy of it.
Here is a site you can visit to learn about all
HTML Tags
that are available. Here is another good beginners site
with good live HTML
Demonstrations. Here is a helpful information on the
use of
HTML Tables and
Graphic Images and
MultiLine Forms and how to add
Sounds (waves) and
Navigational Aids.
After writing your page, you can load it into your own
Browser to view it. There is no need to go live to
test it. Many good text editors such as UltraEdit have a special
button to load the html code into your default browser
for viewing. In addition, there are web pages that
test and grade your web page. A good one is
Net Mechanic.
Here is another secret. All of todays Broswers have ftp
recv built in for downloading files. The actual syntax
is:
"ftp://username:password@ftp.server.com/customers/". Of
course most modern browsers do all this automatically
for you just by clicking on a FTP link. Typically an
FTP server accepts "anonymous" as a username and your
email address as a password. Some older Browsers, such
as Netscape 3 had the ability to FTP upload.
Here are some tips to follow when writing HTML.
Always keep the page "purpose" in focus; i.e. stick to
your basic theme.
Always keep in mind "loading speed" and design your
code for the fastest possible delivery time and
display. Meaning, keep your procedures tight and avoid
un necessary nesting and long processes. Be as short
as practical with your tags constantly closing. This
way the browser "thinks" the code is ending and is
fooled into dumping immediately to the screen as it
gets the code; when in fact, it ain't over, till its
all over. This technique is particularly important when
displaying many graphic images and long text dialog.
Avoid Hit Counters, aside from consuming load time they
are of limited use on personal web sites.
Avoid "last updated" tags. They do little but advertise
your failure to keep your material current. If you need
personal reminders, make them non displaying tags within
the html code. i.e. <! this is a private note >
Resist the urge to use Frames and Embedded Music files.
Remember, not all Browsers can handle this advanced
stuff. You want to play to the largest audience.
Remember, every <TAG> must have a closing </TAG>
Learn the correct rules for nesting tags within tags.
Check ALL text spelling and grammar before uploading.
Keep your links relevant to your theme.
Keep your page updated with new interesting stuff.
Never over crowd or "pack" your page.
Always thank your visitors and invite them back.
"So, there it is", as the Austrian king was fond of saying!
Extra HTML Hints:
Note in my example HTML code the <PRE> or PRE
formatted Tag. This allows plain text to appear on
your page exactly like its formatted in ASCII (or how
you view it in your text editor).
Need to create SPACES in your interpreted code?
Use "& nbsp;" (less quotes) where you want the SPACE to
appear.
Want to show the International symbol for Copyright?
Use "& copy;" where you want the © symbol to appear.
Speaking of copyrights, here is the gist of International
copyright law.
By stating "copyright, date, author" somewhere in your
document, it's automatically copyrighted. However, if
you fail to register the copyright, you can sue to
stop someone from using your work, but you cannot sue
for any monetary losses that you might suffer.
|