HTML body tag and its uses
Within the body tags we keep our content and that gets displayed. This is the most important and main tag of any html web page as the content within this tag is displayed to the browser.
One pair of body tag ( opening and closing ) is used in one page.
Body tag hold the style of the total page and they can be declared within this tag. By using one external style sheet we can add styles to the body tag. Cascade Style sheets are also used to define the style property of body tags. The background image , colour, links etc can be managed from body tag. Read the CSS section for this.
This body tag is used just after the closing of head tag. They are to be closed before the end of html tag.
Body tags can keep all type of tags within them.
Here is an example of simple body tag in a web page.
<!doctype html public "-//w3c//dtd html 3.2//en">
<title>(Type a title for your page here)</title>
<META NAME="DESCRIPTION" CONTENT="HTML body tags and how to use in webpage">
<META NAME="KEYWORDS" CONTENT="body tag, html body tag, tags in html">
As you have seen how the head tag is used before body tags and stores various script and information about the page. Some of the important tags like title, script , style etc are kept inside this head tag.
Create a web page ( save as my_page.htm) to display your name in bold letters , in next line it should display your house address with required line breaks. You phone number should be displayed in Italic style at the end.
How body tag is used to set background color of the web page
Be the first to post comment on this article :
|Click for more Questions on HTML|