Bottom of page
HTML Tutorial
Written by Colin D. Joye 1/00
Html is one of the most useful, easy-to-learn languages you can use. It's good for
making just about anything on your web pages: nicely styled reports, resumes, questionaires, tutorials,... you can even "embed"
multiple, surfable webpages on one webpage! I have one friend who writes all his reports in Html, and
prints them directly from his website! Html really does do that good a job at making things look nice.
The whole structure of Html is based on "tags". A tag is anything placed inside the
"<" bracket and ">" bracket. Any command is put inside these brackets. Contrary to some misconception,
the command in tags can be either upper or lower case, not just upper. I find it easier to type in
lower case, so that's what I use. Almost every tag must be "turned on" (just using the tag) and
"turned off" (using the same tag, but with a slash, "/", before the letters). For example, the
widely used "anchor tag" (for making links) would be used: <a href="destination.html">
destination</a>. It would come out something like this:
destination. The only tags that I know of which do not need to be
"turned off" are <img>, <br>, <hr>,and <li>. <a name="NAME"> and
<p> also do not require turning off, but it's recommended. Surely, there are others besides.
To create an Html file, type the template given in the "Basic Structure" window below
into an editor (I always use Notepad), and save it as
"*.html". You usually have to save the "home page" (the main page) as "index.html" or "index.htm" in
order to use it as your main page. My main page has to be saved as "default.htm". Edit, add and build
to the file until you have something to see and then save it. To veiw it, open any browser (Internet
Explorer, Netscape, Aol, ...) and type the file path (e.g. "c:/windows/desktop/index.html") into the
"location" bar on the browser.
All colors can be specified two ways, by name or number. Using a color by name
is not recommended since there are a limited number of colors that can be used. "blue", "khaki",
and "purple" are examples of named colors. I prefer the hexadecimal format for numbers, which
means that the relative amount of red, green or blue is specified from 0 (no red, green or blue) to
F (all red, green or blue). The Html format is "#RRGGBB" where R, G and B are red, green abd blue,
respectively. Thus, "#0000ff" is solid blue and "#ff0000" is solid red. If you want to get a
particular color, use my Color Generator, which generates 4,096 different
colors and gives the hexadecimal number for each.
There are a great number of "modifiers" which will work in most tags you would want
them to work in. To use them, you simply put them inside the tag you expect it might work in,
et voilą, they work!
- align='right' | 'center' | 'left' | 'absmiddle' | (maybe more) --- usually aligning text, images
or tables.
- valign='top' | 'bottom' | 'center' | (maybe more) --- vertical align for text in tables, images...
- width='pixels' | '%' --- allows limits to be set for table widths, horizontal rules, images, etc.
- height='pixels' | '%' --- allows height restrictions to be made in many of the same places as the
"width" modifier.
- text='#ff8833' --- changes color of text to #ff8833 in some places (tables, body...).
- bgcolor="#rrggbb" --- changes background color in table cells, whole page, layers ...
- background="image.gif" --- changes background to an image on page (maybe even table cells).
Usually, if you can use the "bgcolor=" modifier, you can use the "background=" modifier.
- src="image2.gif" --- "src" means "source" and can be images or whole files, such as "src=menu.html".
It's other uses are a
bit obscure.
- name="a_name" --- many more advanced features, such as forms, layers and buttons can be named and
called by name to accept data (this will be explored more in "forms and buttons").
-
Basic Structure of Html:
Below is an incomplete listing of the possible tags that I know of: (click on the linked
tags for an example). Don't forget, nearly all of these links need to be "turned off" (e.g.
</table>) except for the few mentioned above (img, li ...).
Font stuff
- <html> --- defines the beginning of any Html document.
- <head> --- defines the "head" (unseen part used for coding, such as javascript)
of an Html document.
- <body> --- defines the beginning of the "body" of the document (this is where
text, tables, images, frames, and anything else goes).
- <b> or <strong> --- causes text to be Boldface. The "strong"
tag is more widely supported.
- <i> or <em> --- causes text to be Italic. The "em" (for emphasis)
tag is more widely supported.
- <u> --- causes text to be Underlined
- <strike> ---
Strikeout text
- <blink> --- causes . Avoid this annoying tag at all cost!
- <h3> ---
Heading #3 There are 6 heading sizes, h1 (largest) through h6 (smallest).
- <big> --- makes words Big. Looks good on First Letters.
- <small> --- makes words smaller.
- <code> --- puts text in
Code format.
- <sub> --- puts text in Subscript format.
- <sup> --- puts text in Superscript format.
up to window
Format Stuff
- <br> --- "break" creates new line.
- <center> --- centers text, tables, forms, ...
- <p> --- "paragraph" tag. <p> signals start of paragraph, </p> signals end.
These tags are very versatile, since they allow you to justify text right, left, center, top or
bottom simply by using the "align=" and "valign=" options mentioned in the inrtoduction of this page.
- <blockquote> ---
puts a paragraph into an indented square block.
- <hr> --- creates a "horizontal rule" using "width=70%" here.
up to window
up to window
Links and Anchors
- <a href="filename.html">Steve's pages</a> --- creates a "link" with the line under
it. The "filename" can be an entire URL, or just that "filename.html" if the page and link are under
the same directory. Remember to always turn off your links, </a>! There are 3 kinds of links:
unvisited links, active links, and visited links. You can change the color of each link separately
in the "body" tag of the document. For example, "link='#ffff00'" would make every unvisited link
yellow. Likewise, "alink='#ff00ff'" would make every active link purple, and "vlink='#00ffff'"
would make every visited link teal. Some browsers don't support the active link color. Try playing
with the link colors in the "Basic Structure" window above. A visited link is one that has been clicked
on or used already, and an active link (not supported by some browsers) is what color the link changes
as you click on it.
- <a name="anchor"> --- creates a reference which can be linked to from the same page. For
example, the "Basic Structure" window above has such an <a name> tag with the name="window".
This code <a href="#window">window</a> creates a link which goes
to the <a name="window"> tag in the code. Try it: window.
- < > --- <>>
up to window
up to window
Images
- <img src='images/greenface.gif'> --- The image tag. Here's what you get:

- <img src='images/greenface.gif' align='right' width=70 height=70'> --- or, with
these modifiers:

-
up to window
up to window
|