HTML Document


HTML is a markup language. That means that there are special markup codes in your text to tell the browser how to render the document. The markup codes are called HTML Tags. An HTML tag begins with the less-than sign and ends with the greater-than sign. An example:
<body>

There are two ways that an HTML tag can be used. One way is by itself. One example is the <p> tag. (Don't worry about what it means if you don't know). The <p> tag just works by itself.

The other way is in pairs. A good example is the bold tag. It looks like:
<b> This test is bold </b>
Notice that it begins with the <b> tag and end with the </b> tag. The slash before the name of the tag indicates that this is an end tag. You'll just need to learn which tags work by themselves, and which ones work in pairs. Normally it is self-explanatory as in the case of the bold tag. You need to tell the HTML parser when you want to stop making the text bold.

HTML tags can also have name=value pairs in them. These are special keywords that you can give values to. Example:
<a href="index.html">
In this example, href is the name and index.html is the value. Normally you will want to put the value in quotes, as I just did. This prevents any possible confusion, especially if your value has spaces in it.
You can also have multiple name=value pairs in your HTML tag.

So, the general format of an HTML tag is as follows:


 < HTML_tag_name name="value" ... >
Where the HTML_tag_name defines what the tag is (example b means bold, etc.). One important thing to note is that HTML is case-insensitive. So it does not matter whether or not you type <b> or <B>.

Format

The general format of the HTML document is as follows:
<html>
<head>
<title> Some Discriptive Title </title>
</head>
<body>
  Document goes here
</body>
</html>
You should encapsulate the entire HTML document with the <html> and </html> tags. This indicates that it is an HTML document. Next there are two main sections to the HTML document. The first section is the header. You should place <head> and </head> tags to define the header. Within the header you can place the title of the document. Most web brosers will place the title at the very top of the web browser (on the window bar). Use the <title> and </title> tags to define the title of the document. Note that you should make the title somewhat descriptive.

The second major section is the body of the document. Use the <body> and </body> tags to define the body of the document. This is where your text will go.

That's the general format for an HTML document. There are some more advanced features, but you can look at a reference guide to find out more.


index.html

This is just a quick note on the index.html file. If this file exists, and the user does not specify a specific file in the directory, then this is the default file given. So the URL http://www.students.uiuc.edu/~e-huss/ will try to grab the file index.html. If the file does not exist, then it will get a list of all the files in the directory. If the permissions are not set right, then the user will get a Permission Denied error.
Return to the Front Page