The Entire Page Overview
This is the way I make my HTML documents because it works.
Some of the tags may appear un-necessary or redundant, for the browser that the code is being developed with.
However, omitions and special code may display differently on other browsers making compatibility a possible issue.
There is also the issue of retro-compatibility because new features are constantly being developed for hyper text.
This page is intended to provide a guideline.
It is suggested that this code be copied into your work folder where the code itself can be referenced while viewing this page.
The <HTML> Tag
The first tag we use is the <HTML> tag. Its the first tag in the HTML document and the </HTML> end tag is also the last tag in the document.
Why?.... Just because it is, so thats what I do. It works, so I'm not going to fix it.
The <HEAD> Tag
The <HEAD> tag defines the heading information. It contains the tags that I use in my Head section. I typically put a <TITLE> in my head. If I put it on one line, then its the head and title tags, followed by the title text followed by the end title and end head tags.
The <TITLE> tag permits assigning a title to the page. After the title text has been provided, its followed with its </TITLEe> end tag.
The text committed to the title tag is the text that appears in the top line of the browser's page. Some browsers have a built in script to accompany my text, but that isn't all that difficult to live with. The title bar on my browser (The Zilla's Sea Monkey) begins with the browsers icon, my assigned title script followed by the name of my browser. It will be different with other browsers.
The <BODY ... ...... ... > Tag
The <BODY definition defines the beginning of the body of the html document. It declares how the body of the page will be seen in the html display.
The The Body tag begins with <BODY followed with the attibutes and ending with the > character. This is followed by the body of the page text. Finally the end body tag </BODY> is placed immediately before the final </HTML> tag.
Our example declares two attributes, the Back-Ground Color (bgcolor) and the Text Color. Both attributes can be defined on a single line.
<Body BGColor="#888888" Text="#DCE400">
Other attributes are available that will be demonstrated in later examples.
Just a little rith-ma-tick with the Color Numbers
Notice the arguments for the attributes are in quotation marks. The # character is necessary. The six digits define the color in the RGB format.
The first two hex digits define the amount of red in the color, the next two are for green and the last two are for blue.
These numbers are in hexidecimal, so they may be a digit from 0 to F. Zero is decimal 00 and FF is decimal 255.
The number #888888 is 88 red, 88green and 88 blue.
Number #DCE400 is DC red, E4 green and 00 blue.
The color 000000 is BLACK. No amount of any of the colors.
The color FFFFFF is White. 255 units of all three colors.
Open the Microsoft Paint.exe program found in your
START: Program Files: Accessories.
Open the program, go to the menu and select
Colors: Edit Colors: Define Custom Colors.
Mouse over the color selector to find the color you like and note the numbers given for the red, green and blue value.
These are decimal numbers. They must be converted to hexidecimal for us to use.
Go back to the Accessories and select the Calculator.
Click View and select Scientific.
Select DEC and key in the decimal number found in the Paint program.
Select HEX and read out the two digit number converted to hex.
Do this for all three of the color values. Put all three in the RGB format and that is the number that can be used to define the HTML #colors. Nothing to it ......
Housekeeping and Summary
These examples illustrate the way I like to generate my HTML code. It makes it easier for me to make changes as needs be. You will undoubtadly develop your own way of keeping track of your code. A good part of programming is the artistic way code is put together. Coding structure even identifies the programmer as clearly as the fist of a Morse Code operator, or the handwriting of an author.
Again... the object of these examples is to have fun. Play around with the code until it does the things you want it to do. It can be an adventure.