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>.
<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.