Attributes of BODY tag
MARGIN ATTRIBUTE
Margin refers to the blank area
left from the edges of the page on all the sides: top, bottom, left and right.
The values of margin of HTML document are given in pixels.
LEFTMARGIN ATTRIBUTE
This attribute is used to set the
left margin of the web pages.
Syntax : <BODY
leftmargin=value>
Ex : <BODY
leftmargin=40>
RIGHTMARGIN ATTRIBUTE
This attribute is used to set the
right margin of the web pages.
Syntax : <BODY
rightmargin=value>
Ex : <BODY
rightmargin=10>
TOPMARGIN ATTRIBUTE
This attribute is used to set the
top margin of the web pages.
Syntax : <BODY
topmargin=value>
Ex : <BODY
topmargin=30>
BOTTOMMARGIN ATTRIBUTE
This attribute is used to set the
bottom margin of the web pages.
Syntax : <BODY
bottommargin=value>
Ex : <BODY
bottommargin=50>
EXAMPLE
<html>
<head>
<title> checking margin attribute</title>
</head>
<body leftmargin=40 topmargin=50 rightmargin=40 bottommargin=50>
Hello!! Guys we are just studying about HTML. It is so easy and interesting language. Have fun!! HTML used to have hyperlinks which mean it used to create links by which it helps to join from one location to another. While, hypertext refers to dynamic pages means a HTML document have text, image, audio, video and many more as well.
</body>
</html>
<head>
<title> checking margin attribute</title>
</head>
<body leftmargin=40 topmargin=50 rightmargin=40 bottommargin=50>
Hello!! Guys we are just studying about HTML. It is so easy and interesting language. Have fun!! HTML used to have hyperlinks which mean it used to create links by which it helps to join from one location to another. While, hypertext refers to dynamic pages means a HTML document have text, image, audio, video and many more as well.
</body>
</html>
BACKGROUND IMAGE ATTRIBUTE
Background image attribute is used
to insert image as the background of our HTML document.
Syntax : <BODY
background=”path/file name”>
Ex : <BODY
background=”start.jpg>
EXAMPLE
<html>
<head>
<title> checking margin attribute</title>
</head>
<body text=white background=”cloud.jpg”>
Hello!! Guys we are just studying about HTML. It is so easy and interesting language. Have fun!! HTML used to have hyperlinks which mean it used to create links by which it helps to join from one location to another. While, hypertext refers to dynamic pages means a HTML document have text, image, audio, video and many more as well.
</body>
</html>
<head>
<title> checking margin attribute</title>
</head>
<body text=white background=”cloud.jpg”>
Hello!! Guys we are just studying about HTML. It is so easy and interesting language. Have fun!! HTML used to have hyperlinks which mean it used to create links by which it helps to join from one location to another. While, hypertext refers to dynamic pages means a HTML document have text, image, audio, video and many more as well.
</html>


Nice work and words
ReplyDelete:- SHAURYA ANUPAM SHARMA
Thank you bhai
Delete