HTML TUTOROAL 3

The <html> tag

The html tag identifies the document as an html document.
Every html document begins with <HTML>and ends with </html>.

The<head>tag


this tag contains information about the document,including its title,scripts used,style definitions,and document description.

The <title>tag


The tag contains the document title.Text appears on the browsers title bar.

the <body>tag


The <body> element contains the visible page content.

Now lets start  talking about some attributes related to body.



background bg color


this attribute is used to color the background
<body bg color="red">

you can  give amy color name what you want jus wrigin it inside double braces.


text color
 

This attribute is used for coloring the text inside body.

<body bgcolor="green"text="red">

left margin and top margins attribute


This attribute is used for margening the content inside body.
Basic syntax is:
<BODY alignmargin="value">

In the place of align you can use left or top which you want.

Its an example of that is.


<html>
<head>
<title>
usage of margin
</title>

</head>
<body leftmargin=60 topmargin=70>
Hi welcome to body

</body>
</html>

you can copy the code and save it with html extension and preview in browser.

Center tag


Now if you want that your content align on center of the screen so, you can use the <center>tag in place of magins.

example to show that

<html>
<head>
<title>
center tag
</title>

</head>
<body>
i am <center>god</center>

</body>
</html>


Now practice with all the stuff written before and try something from your own.