Body tag

The body tag element contains all the contents of an HTML document, such as text, hyperlinks, images, tables, lists, etc. All the content of your Html page is in the body tag. In short the content that you want to show on your page is written inside body tag. The HTML tag defines the main content of the HTML document or the section of the HTML document that will be directly visible on your web page. This tag is also commonly referred to as the element. 

Purpose of Body tag

 This tag contains the code that generate what is seen in a browser. This is what you see on your computer screen when you go to a web page, and most of the work you do is on code found between the opening and closing body tag.

EXAMPLE

<html>

<head>
    <title>My First HTML Page</title>
</head>

<body>

    Main content of your page.

</body>

</html>

OUTPUT

Main content of your page.

Note

  • The HTML <body> element is found within the <html> tag.
  • The most common elements to be placed in the HTML <body> tag are: <h1><p><div><table> tags.
Chrome Firefox IE Opera Safari Android
   Yes  Yes Yes   Yes Yes Yes

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Close Menu