While everyone's web page is different, they all have to have the same basic structure. This uniformity allows browsers (like Netscape) to read the page and understand what the author means.
The framework of a web page is this:
| The Body of Your Page |
The tells the browser that your page is definitely HTML code.
The encloses the header of your page. In the page header, you can add lots of other commands which give the browser special information about your page.
The sections off the part of your page that will actually be displayed.
Now that you have the framework, what actually goes in it? Well, think of the body of a web page as an old WordStar-style document. It consists mainly of text, modified by Tags. There are a wide variety of tags, some of which are interpreted differently by different browsers.
NOTE: In general, all HTML commands will take the form:
Style Tags modify the way your text looks. The following list is not comprehensive, but it's close:
codepreformatted text
NOTE: HTML does not recognize more than one consecutive space as separate entities, so ten spaces, 2 carriage returns, 3 tabs and 5 more spaces will look like a single space on your web page when viewed by a browser. One of the only ways to get HTML to recognize multiple whitespace characters is to use preformatted text. The downside is that it's displayed in a blah, typewriter-like font.
Since HTML interprets carriage returns as spaces, special tags must be used for carriage returns. The is the same as two carriage returns.
tag is the same as a carriage return, and
NOTE: Since HTML condenses whitespace, two must be used to get a space between lines.
tags together are still only equivalent to one carriage return.
Along the same lines as and
, is the
tag. The difference is that instead of a space between lines, it draws a line between them.
The thickness of the line can be controlled by using
There is also a No Break tag. It tells the browser that the enclosed text should not be broken up unless absolutely necessary. The No Break tag looks like this:
Heading Tags are very similar to style tags. Headings come in six sizes, 1-6. 1 is the largest. 6 is smallest. The heading tag also includes an implicit
at the beginning and end. The format for the heading tags is
A very useful ability is changing the Font Size. This can be done two ways. First, is can be done with
One of the cooler tricks with font tags is to simulate an ALLCAPS FONT. Just make the caps a size or more larger than the lower case letters.
Some characters are recognized by HTML as part of the code, not as text. &, ", <, and > all are interpreted as code. To use one of these characters in your text, you must use an equivalent code. Here's a list:
| & | & |
| " | " |
| < | < |
| > | > |
| ? | ® |
| ? | © |
NOTE: & codes ARE case sensitive.
The next lesson is Structures.