What Is The HTML Body Tag?

What Is The HTML Body Tag

Date First Published: 14th November 2022

Topic: Web Design & Development

Subtopic: Web Development

Article Type: Computer Terms & Definitions

Difficulty: Medium

Difficulty Level: 4/10

Learn more about what the HTML body tag is in this article.

The HTML body tag is used to define the body of a HTML document. All the contents of a HTML document, such as the paragraphs, headings, images, tables, videos, lists, and hyperlinks are placed within the opening and closing tags. This basic HTML tag is supported by all common web browsers.

Unlike the HTML head tag, which defines the metadata of a HTML document and is not visible on the page, content in the HTML body tag will always be displayed on the page. New lines are often added to start new elements in the head section to differentiate between different elements, although putting all of the elements onto one line will not make any difference to how the metadata is rendered.

Note: Info Icon

This tag is required in every HTML document and there can only be one <body> tag per page. It must also be placed after the <head> tag or between the </head> and </html> tags.

Example Of The HTML Body Tag

<!DOCTYPE html> <html> <head> <title>Computerhelp4all.com</title> <meta name="description" content="This is a description."> <link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css"> </head> <body> <h1>This is an example of text within the body section.</h1> <p>This is an example of a HTML page with paragraphs.</p> <p>Paragraph 2</p> <p>Paragraph 3</p> </body> </html>


Feedback

  • Is there anything that you disagree with on this page?
  • Are there any spelling, grammatical, or punctuation errors on this page?
  • Are there any broken links or design errors on this page?

If so, it is important that you tell me as soon as possible on this page.