
HTML stands for Hypertext Markup Language which is a language that browsers use to interpret the text you prepare.
When working with text being prepared for browsers, there are several things you must take into consideration.
For starters, the browser sees no difference between
These
words
are
typed
| one | word | per | line | or with strange | spacing |
and
These words are typed one word per line or with strange spacing
In other words, spaces and carriage returns are not honored in the usual way.
Q. So how do I force text to go to the next line?
A. By inserting the code <br> or the code <p> .
Q. What's the difference between <br> and <p>?
A. They are different types of line breaks, with different spacing between
lines.
Note then that if you were to prepare text as usual, then the browser would show only one paragraph.
Q. I am used to typing in ALLCAPS. Why not use ALLCAPS for a web site?
I think that would be cool!
A. Wrong. Cool it is not.
If I can put that to rest, then, you will prepare things using mixed case mode, and you will start by taking normal text and inserting <p> wherever a new paragraph begins. Try looking at such text before and after you insert the paragraph codes. The <br> codes can be used to form some simple lists - though later you will find far more effective ways of doing that. Of course, before you can look at it with a browser, you must save it in ASCII Text format. You can use a word processor to prepare it, but you must be very careful when saving the file - make sure that the File Type selected is ASCII text.
Q. Anything I boldface in my word processor will be lost. So how can
I get something to show up in boldface?
A. The Break and Paragraph codes are called tags. Boldface, by its nature,
requires a different kind of code. Boldface is a feature which must be
turned on and turned off. The preferred way to accomplish this at
this point is to use <strong> and </strong> and sandwich in
between all text to be emphasized. For example,
If you type: This is a word to be <strong> emphasized </strong>
the browser will show the result
This is a word to be emphasized
Q. What other features are controlled this way?
A. Here's a list:
h1 |
h2 |
h3 |
h4 |
h5 |
h6 |
Headings are designed to set off sections of text, so there is an automatic
line break when a heading is turned off.
Therefore the barest of outlines is:
| <html> | |
| <head> | |
| Header material | |
| </head> | |
| <body> | |
| Tables, Text, Graphics, Links |
|
| </body> |
|
| </html> |
The basic ingredients are <a href="somewhere">Link Text</a>
Here are some examples:
Tables are appropriate when you need to have things neatly lined up in columns. Tabs would have been nice, but as of HTML 3.0, Tabs still don't exist. But the same affects can be achieved using tables.
A table can appear with or without a border. "Border" is called an attribute. To turn a table on with a border, use <table border> and to turn a table on without a border use <table>. In both cases, you must remember to turn the table off with </table> or else your text will appear to disappear into nowhere.
When the border attribute is turned on, all cells in the table appear with a border around them. Sometimes this can be used quite effectively.
Each row of a table begins with <tr> and each cell within a row begins with <td>.
Here is a table with two rows and 4 cells in each row, with a border:
| 1995 | Providence | RI | Narragansett Bay Chorus |
| 1996 | Portland | ME | Narragansett Bay Chorus |
And here is the same table without a border.
| 1995 | Providence | RI | Narragansett Bay Chorus |
| 1996 | Portland | ME | Narragansett Bay Chorus |
And here is the same bordered table centered (simply include the entire table between <center> and </center>.
| 1995 | Providence | RI | Narragansett Bay Chorus |
| 1996 | Portland | ME | Narragansett Bay Chorus |
You can also put graphics into the cells of a table (see the section on inserting graphics).
Images can sometimes be very big files. When they have to be sent from one computer to another, it can take a lot of time. And that is what happens when you open a site that shows graphics - the images are downloaded to your computer.
So what is REALLY happening when you right-click to download? It is already on your computer; so it just copies it from the cache area where it put the image to the folder you specify.
To help this process, two file formats have been developed which the browser can interpret. They are JPEG (JPG) and GIF. Both of these are compressed, so their file size is much smaller than their non- compressed cousins. This means that they can be sent to your computer faster.
Therefore, when you obtain an image, it has to be saved in one of these formats. Frequently the JPG is a smaller file size (though a bit grainier) and so many places prefer it.
There are many sources for graphics. You can buy disks full of graphics or you can download them from the Internet. Many places now offer you a service when you have your films developed there - they can return it to you on a floppy disk along with a program to view them. Yet another way is to have them scanned.
Whatever your source, it is likely that they will not arrive into your computer in the format you need (GIF or JPG). So you need a graphic converter. Some public domain programs like Graphics Workshop work well. But programs like Corel PhotoPaint also will perform this task. The idea is to load it into the software as one type of file and save it as another type. When you attempt this, you should be aware that it is not enough simply to NAME the file using JPG or GIF extensions. Using whichever software you have, you must select the File Type to agree with the extension you choose. If you get them from the place where you have your films developed, they will arrive with a program for viewing; the same program will also convert them.
When you have the file in one of these formats, you get the browser to place the image somewhere by using the <img src=" ... "> technique. You put the filename inside of the quotes - and the file can be anywhere in the world. If the file is not at the same web site, you must insert the complete name of the file. Here are some examples:
Return to
Table of Contents
I prepared this for several reasons:
Please keep these things in mind as you explore this. There truly is a bewildering array of possibilities and details which could be included. I want to keep it down to the very basics which can be of assistance in constructing a good, basic Web Page.
As a result, I will not try to be everything for everybody. This is for beginners who want to get their feet wet before trying more herculean things like image maps and frames and Java scripts.
It has been my experience that even in the early stages, people want to get involved with the appearance of the backgrounds in their pages. People like working with colors and images as a backdrop for their message. I decided therefore to provide the basic information for doing this.
Remember that there is a <body> tag in every HTML document, or there should be. Remember also there there can be only one <body> tag. If you insert more than one <body> tag, only the very first will be honored.
The <body> tag can be expanded with what is called "attributes." To change the color of the background, you insert a "bgcolor" attribute as follows:
<body bgcolor="nnnnnn">
where the n's must be replaced with numerals 0,1,2,3,4,5,6,7,8,9, or letters a,b,c,d,e,f.
Grouped in two digits, these numerals control the mix of Red, Green, Blue.
You can also name the colors by name, if you know the name. For a list of color names, their corresponding numbers, and a view of the color itself,
Now this is the barest of things here, and to understand it, you must work with things you have not considered before - but it is an adventure.
To begin with, if you change the background color, you may render certain things invisible. In extreme form, suppose you changed the background color to black. Then you could not read the text, which is also black. So readability is an important issue when working with colors.
Let's start with the fact that certain color combinations are not advisable. Many are color blind, and producing red text on a green background can cause some a lot of grief. Garish colors in the background, such as bright purple, can also produce such negative results that people won't want to read your pages.
Whatever color you pick, the text should be in a color which has sufficient contrast to make it easy to read. Dark grey text on black background is very hard to read, so it is annoying to the reader. This author has seen several pages designed by real "designers" which are offensive to the viewer in this respect.
It is clear then that when you manipulate background colors, you may also want to change text colors, and there are several kinds of text colors that you need to look at.
So a "body tag" could look like this:
<body bgcolor="#000000" text="#00ff00" link="#ff0000 vlink="#0000ff">
to say the least.
There are a total of 256 colors to choose from. To know them all by number is asking a bit much. So the colors all have been given names! You can then use the names instead of the numbers. So, for example, you can use bgcolor="black" and text="white" to obtain white text on black background. the basic colors will work as expected - red, blue, purple, yellow, green, orange, cyan, magenta, chartreuse, teal, acqua to name a few. The names of the colors however themselves can grow be a challenge.
Although this discussion has been in the context of setting background colors for the entire body of the page, the same rules apply to table cells. You can add any of these attributes within a cell of a table to control colors of that cell. For example,
<table border=8>
<tr>
<td bgcolor="red" text="white">Left Cell
<td bgcolor="cyan" text="red">Right Cell
</table>
Will produce a table with two cells - one of them with a red background, the other with a cyan background, as follows:
| Left Cell | Right Cell |
Any image which the browser can show can be used as a background image. That is to say, one can use any .GIF or and .JPG file. Once again, you use the body tag to accomplish this. The syntax is as follows:
<body background="image.gif">
The image will be used to tile the background of the page. Remember however that text will be flowing over the image. This means that color considerations discussed above are still important. If the background image is dark, you should be careful to set the text color light, so that the text is visible.
A backgound image should not therefore contain
Caution: HTML tags are not themselves case sensitive. However, when you
name the background image, remember that many host systems are case
sensitive.