|
|
Tips
for Beginners
As I mentioned in the Overview,
you'd probably be smart to take a class where the teacher
can answer your questions and guide you through building
a Web page the first time. But, failing that, your best
bet is to peruse the online tutorials
I've recommended.
Things
you need to know up front
- FILE
NAMES. Make file
names meaningful (so you can remember what they represent),
but don't leave any spaces!
And it's a good idea to make names of all files (both
graphics and HTML files) lowercase.
Though most Web servers permit both upper and lower-case
letters in a filename, you'll keep out of trouble if you
consistently use lowercase names.
- GET
THE FILE STRUCTURE RIGHT. Create
the file structure of the Web site exactly as it will be
constructed on the host server, and use relative
paths rather than absolute paths for internal hyperlinks.
Robert Crooks walks you through the process. Just log on
to his home
page, click the Web Design link, then select
Building a Web Site. Start with Step 1, "Creating
an Appropriate Directory Structure."
In
short, you create one master folder that will house your
entire Web site, then create sub-folders within that folder
to hold various sections of the site. For instance, most
developers put all the graphics in a sub-folder called
something appropriate like "images." This is
convenient so that GIF and JPEG files will not be mixed
in with your HTML files as you're creating the site. And
remember, you can reference any graphic file as many times
as you wish. As an example, your logo can live in the
"images" folder and yet be referenced on several different
pages, even if those pages are in different sub-folders.
When your site is set up correctly,
you can simply upload the entire master directory to the
host Web server.
- USE
RELATIVE PATHS. When
you create hyperlinks that connect to another page within
your Web site, be sure to use relative paths rather than
absolute hard-coded paths. That is, make the hyperlinks
relative to other files in the master folder, but don't
link to a specific location on your hard drive. When surfers
in Des Moines click on one of those links, they won't be
able to connect to your computer. For example, you would
code it:
Correct
(relative to master folder)
<IMG SRC="images/graphic.gif" BORDER=0 WIDTH=42 HEIGHT=52>
Wrong
(hard-coded to your hard drive)
<IMG SRC="c:/mywebsite/images/graphic.gif" BORDER=0
WIDTH=42 HEIGHT=52>
And you certainly don't want to link
to any files that are NOT in the Web site master
folder.
- COMMENT
YOUR CODE. Use
comment tags to annotate your code to make editing easier.
It's discouraging even to experienced Web designers to look
for problems in a massive block of HTML code. But if you
use white space to separate various sections of the code
and insert comment tags before and after such sections,
it will be much easier to read. Comment tags look like this:
<!--Start of menu bar-->
You must include the exclamation
mark and the hyphens as shown. Such tags will not display
in the browser, but any surfer who looks at the source
code can read them. In any event, they come in very handy
when you're trying to figure out what went wrong with
your code.
- DON'T
MIX PERSONAL AND PROFESSIONAL INFO.
The first thing you're
going to want to do is to put your kids' pictures and maybe
your dog and cat and parrot on your Web site. After all,
the relatives and in-laws will get such a kick out of it!
And while you've got control of that Web space, it's only
natural that you'd put in a plug for your talents and skills.
And maybe you're thinking you'd just put your resume out
there just in case somebody's looking for a valuable employee
such as yourself. DON'T
MIX PROFESSIONAL AND PERSONAL! Build two separate sites.
Folks looking to hire you must see
you as a professional and are not interested in your menagerie,
however cute.
- DON'T
PUT YOUR PHONE NUMBER AND ADDRESS ON YOUR WEB SITE!
Do you really want millions
of people (including thieves, forgers, and con artists)
in China, Russia, and Croatia to know where you live and
how to call you up? People who are seeking to exploit you
can find out plenty of personal information about you without
your help. An e-mail address is quite sufficient if you
want people to contact you.
- DON'T EXPECT
YOUR FIRST EFFORT TO BE A MASTERPIECE. But
get started. Just do it. It's certainly good to have some sort of theme in
mind when you start, but the important thing is to start working on the tutorials,
and as you learn something, put it into practice. Then keep reworking your
site as new discoveries improve your skills. You're in for a lifetime of learning
since HTML coding standards will be revised and expanded FOREVER. Just get
started.
|