The <body> tag in HTML is used to define the main content present inside an HTML page. It is always enclosed within <html>tag. The <body> tag is the last child of <html> tag. A body tag contains starting as well as an ending tag.
<body> Body Contents... </body>
Attributes: There are many attributes in <body> tag which are depreciated from HTML5 are listed below:
- background: It contains the URL of background image. It is used to set the background image.
- bgcolor: It is used to specify the background color of an image.
- alink: It is used to specify the color of active link.
- link: It is used to specify the color of visited links.
- text: It specify the color of text in a document.
- vlink: It specify the color of visited links.
Example 2: Example to show the functioning of a Body tag along with its CSS implementation
Supported Browsers: The browser supported by <body> tag are listed below:
- Google Chrome
- Internet Explorer
- How to get all HTML content from DOMParser excluding the outer body tag ?
- HTML | DOM body Property
- HTML | DOM Body Object
- HTML | <body> background Attribute
- How to create table with 100% width, with vertical scroll inside table body in HTML ?
- HTML | body text Attribute
- HTML | <body> bgcolor Attribute
- HTML | <body> link Attribute
- HTML | <body> vlink Attribute
- HTML | <body> alink Attribute
- What purpose does a <script> tag serve inside of a <noscript> tag?
- Difference between <article> tag and <section> tag
- Why <big> tag is not in HTML5 while <small> tag exists ?
- Body-parser middleware in Node.js
- Parsing form data in express app manually without body-parser
- How to group the body content in a table using HTML5 ?
- Express.js req.body Property
- HTML | <html> Tag
- HTML | <section> Tag
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.