In order to make a perfect web page you must understand all of the commands in HTML that are at your disposal. Armed with this knowledge you can do exactly what you want. Sometimes people’s web pages do not turn out exactly how they wanted them to be because they did not know the command that did exactly what they wanted. In HTML, just as in any other programming language, there are specified commands that “tell” the web browser how to display the document. These commands are be sent to the browser in the form of source code which is translated into what you see when you “surf” the net.
There are a great deal of commands in HTML which do a variety of different things. Once you finish this book you will be acquainted with all of these commands and you will be told exactly what they do and how to incorporate them into your web page.
The Head Command
The most basic command, and the first one we will learn, is the head command. Anything on your web page that is not going to appear in the body of your browser will be contained in the head command. The body of the browser is the area that contains the main page, normally the area that has a scroll bar and so on. For example, if you put a title on your web page it will appear in the head command because it does not effect the body of the document. Certain Javascript programs appear in the head of the document because they, possibly, do not run a program that deals with an action that happens in the body of the document. However, you do not always need to use the head command on your page. If, for example, you only have a title and everything else appears in the body of the document then the browser will be able to understand where the title is supposed to go.
In order to use the head command on your page you must enter a command that tells the web browser where the head information begins and ends. The command that tells the browser where the head is begins is an angle bracket “<“ followed by the word HEAD followed by an angle bracket “>”. After you have entered this command you will then enter anything that is going to go in the head of your page. Once you have entered the items that are going to appear in the head you will then need to make sure that you enter the command that tells the web browser that you are done entering the items that are going to appear in the head and ready to start on something else. This command is an angle bracket “<“ followed by a slash “/” followed by the word HEAD followed by an angle bracket “>”. The final source code for the most basic head, which is one that contains nothing in it because we have not learned any other commands yet, would look like this: (Note that the items that would appear in the head would go in between the opening and the closing head command.)