Body tag
The body tag involves various attributes within it which perform various functions.We can change colour of the document we can give colour to webpage to the text and also we can set a background of the page.
The attributes of the body tag are:
Text
Background
Left margin
Top margin
Bgcolor
Text: The text tag is used to given to the colour of text in the web page.The default colour is black.
<html>
<body text=”red”>
Colour
</body>
</html>
Background: This is used to give the background of the Html document when displayed as web page. The image displays behind the text and tiles the background
<html>
<body background=”image.jpg”>
Background
</body>
</html>
Left margin :The left margin button is used to adjust space or margin between the left border of the window and the text on the left side of the window is handled and value given in terms of pixels
Top margin:Top margin is used to adjust the top border of the browser window and at the top of the document .
<html>
<body topmargin=10 leftmargin=10>
The text shows margin use
</body>
</html>
Bgcolor:The bgcolor attribute is used to give the background color of the document. It takes value based on colour provide.
<html>
<body bgcolor=”yellow”>
</body>
</html>
Break statement:The br tag is used to give break between some statements like the statement to be entered in next line.
<html>
<body>
The line is moved to next<br>
This is use of break tag<br>
</body>
</html>
Kommentare