Home | Contact Us

C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML

HTML body Tag

HTML body Tag with html tutorial, tags, anchor, img, div, entity, textarea, marquee, p tag, heading tag, h1, h2, table, formatting, attribute, elements, ol, ul, Input Types, block element tag, inline element tag, html tags, phrase tag, head, body, form, lists, symbols etc.

<< Back to HTML

HTML <body> tag

HTML <body> tag defines the main content of an HTML document which displays on the browser. It can contain text content, paragraphs, headings, images, tables, links, videos, etc.

The <body> must be the second element after the <head> tag or it should be placed between </head> and </html> tags. This tag is required for every HTML document and should only use once in the whole HTML document.


<body> Place your Content here........</body>

Following are some specifications about the <body> tag

Display Inline
Start tag/End tag Both start and End tag
Usage Structural


<!DOCTYPE html>
 <title>Body Tag</title>
 <h2>Example of body tag</h2>
 <p>This paragraph is written between the body tag</p>
Test it Now


HTML body tag


Tag specific Attributes

Attribute Value Description
alink color It defines the color of the active link in a document. (Not supported in HTML5)
background URL It determines the background image for the document. (Not supported in HTML5)
bgcolor color It determines the background color of the content. (Not supported in HTML5)
link color It determines the color of the unvisited link. (Not supported in HTML5)
text color It determines the color of the text in the document. (Not supported in HTML5)
vlink color It determines the color of the visited link. (Not supported in HTML5)
onload Function call on page loading
onunload Function call when user leaves the page
onfocus Function call when document receives focus by user.
onblur Function call when document loses focus by user.

Global Attribute

The <body> attribute supports global attribute in HTML.

Event Attribute

The <body> attribute supports Event attributes in HTML.

Supporting Browsers

Elementchrome browser Chromeie browser IEfirefox browser Firefoxopera browser Operasafari browser Safari
Next TopicHTML br Tag

Related Links:

Related Links

Adjectives Ado Ai Android Angular Antonyms Apache Articles Asp Autocad Automata Aws Azure Basic Binary Bitcoin Blockchain C Cassandra Change Coa Computer Control Cpp Create Creating C-Sharp Cyber Daa Data Dbms Deletion Devops Difference Discrete Es6 Ethical Examples Features Firebase Flutter Fs Git Go Hbase History Hive Hiveql How Html Idioms Insertion Installing Ios Java Joomla Js Kafka Kali Laravel Logical Machine Matlab Matrix Mongodb Mysql One Opencv Oracle Ordering Os Pandas Php Pig Pl Postgresql Powershell Prepositions Program Python React Ruby Scala Selecting Selenium Sentence Seo Sharepoint Software Spellings Spotting Spring Sql Sqlite Sqoop Svn Swift Synonyms Talend Testng Types Uml Unity Vbnet Verbal Webdriver What Wpf