HTML Lesson 3
Don't Forget,
You can print this page if you want to. So you can study off line.
In lesson 1 we learned Rule number 1. Every tag you open, you must close. Lets go over what we learned in lesson 2. - We learned a new rule, that we can only use 1 opening and 1 closing HTML tag no matter how long our page is. If you create a web site that has lots of seperate pages you still only use 1 pair on each page. So this is Rule 2.
- Since we are talking about rules here's another that I mentioned in the test. ALWAYS; type in a straight line and let the tags break to the next line on their own. Ok so this wasn't in lesson 2 but it was in test 2, I was close. At least I got the 2 right. So this is Rule 3.
- We learned the 2 HTML tags.
- The 2 head tags, and the 2 title tags where we will put the name of our title if you ever think of one!
Now for a new tag. The <body></body> tags. O yea; this is a good one. This one is important. This is the one that makes the page. Ok mabe to much of a build up, but it is important. Every thing that you write to create your web page goes inbetween those tags. The browser can't wait to get to the body tag to see what you have created. So we write it like this, <html><head><title>your title goes here</title></head><body>the rest of your entire web page will go in here. everything, pictures, images, anything you want. Your gonna learn how to change the size and color of your letters or words. This will go in here to. Then when you get tired of typing!</body></html> And your page will be done. You wish it was over. Not untill I learn some more tags. You are not going to let me off that easy. I paid for 3 lessons and I want them. Besides were not finished with the body tag yet. This is serious, so you will have to stop fooling around now and make me pay attention. Here we go! There is other information that can be put inside the opening body tag. - You can have any background color you want, or a picture or image for your background. For now we will work with just color, later I'll show you how to have an image . Just click each number background to see an example. Also notice that the links are red now, see what happens when you return.Background 1
Background 2 background 3Instead of having to type 2 full words, background color=" ? " you only have to type bgcolor=" ? " So our tag will look like this for now, <body bgcolor="white" WOW! there's those 2 symbols we been looking for. The equal = and the quotations " " See how their used? You told the browser you wanted a background color so, bgcolor equals Since there are so many choices you have to emphasize or specify exactly what you want, so that's where the quotations are used. bgcolor="green" Not so hard were they? They are easy to use. The words that you type are actually called "TEXT" so if you know that all or most of your words will be a certain color, you can tell the browser that by putting the color you want in your body tag and all your words will be that color. (Don't worry I will show you how to change the color any time you want.) Have you noticed my pages? Most of my writing is black. So I put black in my tag, then I change it when I want to. So this part is real easy, we say what color we want our words (text) to be, text="black" So our tag now looks like this, <body bgcolor="white"text="black" Sorry! here's another darn rule. What's this number 4? Have you noticed that when we are typing the tags there are no spaces? Only With a tag like this and a few others do you ever put a space except the 1 that seperates body from bgcolor. This is very important. - A link on your page, A link is a word or image that when you click on it, it takes you to another page. The 3 backgrounds above you clicked on are links. Did you notice they were red before you clicked on, and after they were blue? The reason for the different colors is, if you have a lot of links, a visitor can tell which one they have already went to so they don't have to go there again unless they want to.
You may not want links on your page but this is a good thing to learn in case you ever do. And besides without links you will only have one page because you need a link to go from one to the other. There are 3 parts to the link. a. The link itself link="red"
b. The active link. (from the time your visitor clicks on your link till the time they arrive at the new page the link can change a different color if you want it to.) alink="green"
c. The visited link. (they have visited and they are back and this color will let them know they already used that link.) vlink="blue" If you deceide to use links you would write them like this; link="red"alink="green"vlink="blue"And this is our body tag. If you don't want links then leave them off. Or make the colors what you want even all the same color. <body bgcolor="white"text="black"link="red"alink="green"vlink="blue"> I used red, green and blue as an example you can have any color you want. For now we will be working with basic colors like red, blue, green ect. Later, If your good! I will show you how to have any shade of color you want. And this is what it looks like all put together. <html><head><title>your title will go here</title></head><body bgcolor="white"text="black"link="red"alink="green"vlink="blue">your whole web page goes here</body></html> Are you ready to write all of this? Sure you are. It gets easier each time you practice writing. This is the last lesson where you just copy what you see. At the end of the next lesson you get to see what your writing. Yes you get to finally create something. Practice 3
Or you can go back to, Lesson 2 ------ Practice 2 Lesson 1 ------ Practice 1 Introduction Home Page |