<body> - Body tag in HTML - HTML Tutorial




body tag in html

Body Tag in HTML

Definition of <body> tag :

  • The <body> tag encloses all the contents of an HTML document.
  • The body tag have all the contents of an web page like header tag , title tag, paragraph tag, image tag, and etc.,
  • It must be the second element of an <html> element.
  • The body tag is in the flow content category.
  • The <body> tag also support both Global Attribute and Event attribute.
learn html -  html tutorial -  html development tutorial -  html examples -  html  -  html script -  html program -  html download -  html samples  -  html scripts

Syntax for body tag :

<body>content</body>

Differences between HTML 4.01 and HTML5 for body tag :

HTML 4.0.1

alink, background, bgcolor, link, text, vlink attributes are used.

HTML5

Layout attributes are removed.

Sample Coding for <body> tag :

Tryit<!DOCTYPE html>
  <html >
    <body>
        Welcome to wikitechy.com  
    </body>
  </html>

Code Explanation for <body> tag :

body tag code explanation

  1. Body tag - start with <body> and end with </body>.
  2. “Welcome to wikitechy.com” - Defines in the body tag.

Output for <body> tag :

body tag output

  1. The term “Welcome to Wikitechy.com” is displayed in the output, which is declared within the body tag.

Browser Support for body tag :

Yes Yes Yes Yes Yes

Related Searches to Body tag in HTML

Adblocker detected! Please consider reading this notice.

We've detected that you are using AdBlock Plus or some other adblocking software which is preventing the page from fully loading.

We don't have any banner, Flash, animation, obnoxious sound, or popup ad. We do not implement these annoying types of ads!

We need money to operate the site, and almost all of it comes from our online advertising.

Please add wikitechy.com to your ad blocking whitelist or disable your adblocking software.

×