ad

Sunday, November 23, 2025

how to use body tag in html

how to use body tag in html

web designing theory


 <body> tag is the part of html document that contains all the content that appears on the webpage.  

webpage use anything see text, videos, images, link, buttons, forms inside the <body> tag. 

<body> tag Syntax

 Syntax 

 Syntax of HTML <body> tag


<body>
.
. <!-- body tag content visible to webpage-->

</body>

how to use body tag in html

Example 

<!DOCTYPE html>
<html>
    <body>

     
      <h2> Web designing theory blogspot.com</h2>
      <p> web designing theory offers simple and practical lessons<br>
in programming and web design.join us and start learning today.</p>
    </body>
</html>

how to use body tag in html

Explain Program

Step  1] 

<!DOCTYPE html>

This declare the document type.

browser that the document is written in html

Step 2 ]

<html>.... . </html>

html is the root element of the html page.

 Every thing inside it is part of the webpage.

Step 3]

<body>.....</body>

<body> tag contains  all the visible content of the page.

inside <body> show the browser screen.

Step 4]

<h2> Web designing theory blogspot.com</h2>

<h2> is heading tag.

displays  text in a larger bold style.

headings  from<h1> (largest) to <h6> (smallest).

Step 5]

<p>...</p>

<p> tag paragraph tag.

contains your normal text content.

<br>

<br> tag line break.

 moves text to the next line inside a paragraph.

Step 6]

closing the Tag


</body>

 </html>

how to use body tag in html
Output



Related Post :-