One of the most important tags that will embed many of the other tags you’ll need to add to create a responsive web page is the “<body>” tag. This is another important element of the HTML structure and acts as the engine room after the head tag.
Similar to the name “body,” it encompasses all the elements that enable a website to perform a variety of functionalities, and users are drawn to them.
On the other hand, you will also require cascading style sheets in order to make the body’s elements appealing.
So what exactly are HTML body tags and CSS? Read on to find out.
HTML Body Tag
The <body> tag embeds all of the elements that make up an HTML document, such as headings, paragraphs, images, hyperlinks, tables, lists, etc.
Note: In an HTML document, there can only be one <body> element. When a user visits your website or views your document, the <body> element’s contents are what they see.
If the head element is present, which is optional, the body element must be a direct child of the head element and must come after the head. Texts, images, hyperlinks, lists, paragraphs, headings, and anything else that can be a part of an HTML webpage are all contained within the “body” tag.
The “body” tag contains everything that appears on a webpage when viewed in a browser window. To demonstrate it, let’s look at one example, even though the <body> tag is always in use whenever you write any HTML code.
Example:
<!-- A simple HTML document to illustrate the body tag function in an HTML document -->
<!DOCTYPE html>
<html>
<head>
<title>fanieltech</title>
</head>
<!-- The bode tag opens here -->
<body>
<h1>This is a heading tag element and it is right in the body section</h1>
<p>This is a paragraph tag and it is also in the body section</p>
<!-- The bode tag closes here -->
</body>
</html>
Browser Support for HTML <body> tag
Although all browsers do so, the following list is arranged according to the order in which they support this attribute:
Firefox 1+
Google Chrome 1+
Internet Explorer 2+
Apple Safari 1+
Opera 2.1+
Conclusion
In this article, you learned about the <body> tag and some of its importance or what makes a body tag an important HTML tag.