http://www.bhmadhukar.cjb.net


[ GOD AND GODDESS SLOKA'S & POOJA'S ] [ FLASH MOVIES ] [ HOME ] [ CONTACT ME ]


HTML

HTML Tutorial - [ Beginners, Intermediate & Advanced Users]

Explanation on Body, Center, Font tags


» Know about Body Tag - [View Content] - beginner
» How to Center the text in a document - [View Content]
» How to format the text in a HTML document using FONT tag - [View Content] - beginner

Body Tag

It acts as a container for the body of the HTML document. Generally, it appears after </HEAD> tag.

Ex:-

<html>
<head>
<title>An Example</title>
</head>
<body>
This is a small example
</body>
</html>

Now, we'll see attributes that BODY element supports;

Attribute Description
BACKGROUND It specifies both relative and absolute path of an image file that was tiled accross the document
<BODY BACKGROUND="logo.gif">
BGCOLOR It indicates the back ground color.
<BODY BGCOLOR="#0099BB">
BGPROPERTIES It specifies the behaviour of the background image whether FIXED or SCROLL.
<BODY BACKGROUND="logo.gif" BGPROPERTIES="FIXED">
CLASS It indicates to which style sheet, body tag is linked-up.
Ex:-<BODY CLASS="ChangeTextColor">
SCROLL It indicates whether scrolling is possible within the document body.
<BODY BACKGROUND="logo.gif" SCROLL="no">
LEFTMARGIN &
TOPMARGIN
It specifies the left and top margins (in pixels).
Ex:-<BODY LEFTMARGIN="30" TOPMARGIN="20">
STYLE It specifies the style sheet commands to the body text.
<BODY STYLE="bgcolor: lightblue">
Other attributes that BODY tag supports are ALINK, LINK, TEXT, TITLE and VLINK.
<BODY TEXT="#000000" ALINK="#998800" VLINK="#88BBCC">


                                                                                                                                                                            Top

Center the text in a document

It places the text according to the left and right margins of the document.

<CENTER>This text is centered</CENTER>

Top

Format the text in a HTML document using FONT tag

It alters or sets the font characterstics of the font the browser uses to display text.

Ex:- <FONT>ENJOY</FONT>

Attribute Description
COLOR It indicates the color of the text to be displayed on the document in hexadecimal.
<FONT COLOR="#99BBCC">Hello! How is this?</FONT>
FACE A list of font names has to be provided. It renders the first font from the font list, if present, it sets. Otherwise, it checks for the second font and goes on.
<FONT FACE="ARIAL, Verdana">Hello! How is this?</FONT>
SIZE It is used to size the font.
<FONT SIZE="+3">Hello! How is this?</FONT>


                                                                                                                                                                           Top

"Fundamentals are the Route to the Destination" - BHMK

Go Home


Hosted by www.Geocities.ws

1