Saturday 26 November 2011

Basic HTML Tutorial: Lesson 2

Back to Lesson 1


For lesson 2, we will proceed on how to put something on the html board. In previous we learn about html tag, head tags and also title tags. 


Today another new tag will be preview which is called <BODY> tags, usually it located after the <HTML><HEAD> & <TITLE> tags. Needless to say, keep these in your document.


<HTML>
<HEAD>
<TITLE>ape-ape aje</TITLE>
</HEAD>

<BODY>
</BODY>
</HTML>


Then, type "something really cool." and between the body tags:-

<BODY>
Something really cool
</BODY>

Whenever you make a change to your document, just save it, then hit the Reload button on your browser and you will see the result as below on your webpage file.

Something really cool

Now, we already know what is the use of the body tags. So, let's go further in it. I think the first thing we are going to learn is how to change background colors. So, this is how to change your background color:-

<BODY BGCOLOR="#F0F0F0">
Something really cool
</BODY>
Something really cool


FFFFFF is basic HTML color for white. For more color, you can refer here.

You can find more color later. Usually the browser can read almost all the color coding. Additionally if a background color is specified that is not one of these colors, then browser will usually pick the closest of these colors to use. 


Other than that, you also can specify a background image instead of color. For example, choose any images you want and put it in your website folder. Then, put your address of your images into the body like this:-

<BODY BACKGROUND="../yourfolder/swirlies.gif">
Something really cool
</BODY>

Save your html file and refresh the browser. You will find your images will located at background of your webpage. And one more thing, please make sure that you don't put space any folder's name or any name for your file or else, the reading will be error.

Ok, that's all for today's lesson. In the next lesson, we will learn how to change font in your webpage.

Till then ^_^

Go to Lesson 3

0 comments:

Post a Comment