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">
<html> <head> <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"> </head> <body> </body> </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.
Meta Tags Body tag & background color of the web page
HTML Page Structure


* indicates required
Subscribe to plus2net

    Post your comments , suggestion , error , requirements etc here

    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2024 All rights reserved worldwide Privacy Policy Disclaimer