HTML Tutor
Lesson 1
Lesson 2
Lesson 3
Lesson 4
Lesson 5
Lesson 6
Lesson 7
iDragstor Lab
|
|
|

HTML Tags
Let's review
As you saw in the previous lesson, HTML is a set of instructions to the browser that define what the particular web page should look like. HTML files have html or htm extensions just like Lesson2.html or Lesson2.htm.
<> HTML-TAG
If you ever saw any HTML code you probably noticed <>(less then or greater then) signs around certain words. These words together with <> are known as HTML tags or simply tags. Tags represent the building blocks of the HTML code. So let's look at some html tags:
<B>
Tags will almost always have the beginning tag, like the one above and the ending tag, like the one bellow:
</B>
The only difference between the beggining and the ending tag is the "forward slash /" in the ending tag. This slash determenes the end of a specific tag.
If you put text between <B> and </B> tags, you will get the bolded or ephisized text
This is the normal text
<B>This is the bolded text</B>
Few examples:
<BIG>Big Text</BIG>
<SMALL>Little Text</SMALL>
<U>Underlined text</u>
Page Parts
Every web page has two parts:
<HEAD> </HEAD> Head
The page should start with this tag. Inside of the head you would put the title-tag <TITLE> </TITLE>. After the head you need the body.
<BODY> </BODY> Body
In the body part you will find almost everything that you see on the page, text, images and links to other pages.
Besides these two mandatory parts, there is one more thing you need for the browser to recognize the html code and that is the HTML tag:
<HTML> </HTML>
Now you are ready to make your first html page.
Page Sceleton
<HTML>
<HEAD>
<TITLE>My first web page</TITLE>
</HEAD>
<BODY>
You are writing the <B>HTML</B> code now.
</BODY>
</HTML>
Our example has HTML tag to tell the browser that it is the html code, HEAD tag, TITLE tag and BODY tag with its content. If you want to see what the code from the above looks like in the browser (translated by the browser) do this:
First, copy the above code (Copy) to the new text file. Open your Notepad (Start/Programs/Accessories/Notepad on your computer), choose new file and paste the code (Paste). Save (save as) the new file somewhere on your hard drive as Myfirstpage.html. Don't forget .html or it won't work. After you save it, open the newly created file using your favourite browser. If you don't have a favourite use Internet Explorer or Netscape. If you use Internet Explorer you would go to File/Open/Browse to your file and that's it, congratulations you just made your first HTML page.
Another way to do this is to use our HTML lab and to copy & paste the code inside the window, that you will find when you go there (to the lab). Somehow I have a feeling that you will like this method much better, but try to excercise using the first or traditional way as well.
One more thing. All the excercises that you will do in this tutor, you should save under the same directory, something like HTMLTutor and don't forget the .html or htm extension when you create html files. Now you can take a break.
|
|
|