What is an HTML Body Tag?

A. Leverkuhn

An HTML body tag is a basic kind of marker for a portion of an HTML document. In the HTML, or hypertext markup language, a fundamental Web programming language, these markers are called tags. HTML structure includes specific “open and close” tag elements that help define the parts of a web page.

Body tags are found at the beginning and ends of a line of HTML code.
Body tags are found at the beginning and ends of a line of HTML code.

Like other HTML tags, an HTML body tag set has an opening tag and a closing tag. Both use a set of triangular parentheses, and the closing tag, like other HTML closing tags, uses a backslash. All of the code in between the HTML opening body tag and the HTML closing body tag relates to what is in the body of the HTML document.

HTML structure includes specific “open and close” tag elements that help define the parts of a web page.
HTML structure includes specific “open and close” tag elements that help define the parts of a web page.

One way to define the body of the HTML document is to show what is not included in it. One example of an HTML code module that exists outside of the body is the HTML head. The HTML head also has a similar opening and closing tag structure. The HTML head comes before the HTML body, and contains elements like the HTML title.

Nearly all of the other familiar HTML code structures for images, text, video, tables, and other items are all included in the body of the HTML document. The HTML body represents the entire web page as a code unit. This makes it easy to understand where to open and close the HTML body.

Programmers also have other ways of using the opening HTML body tag. This tag can be used in conjunction with commands on body background color, body text style, and much more. These elements are included in additional tags that programmers usually write adjacent to the opening HTML body tag.

As the programming community works to enhance the functionality and design of web sites, HTML is becoming less often used to build pages, although it still provides a fundamental framework. A lot of the design structures in HTML can now be done in other languages like cascading style sheets or CSS, where a “global” design tool renders many individual HTML tags and commands unnecessary. An organization called the W3C looks at providing consistency and universal standards for languages like CSS, in order to help the web programming community recognize consistent coding practices. Today’s web programmers still learn HTML, but they also learn how to apply other languages to it for a more diverse and complex web site code.

You might also Like

Discussion Comments


@hamje32 - Style is important, but I should point out that no matter how pretty your web page is, it won’t matter if it’s not being seen. Keywords will move your web page up in the search engine rankings.

Make optimizing your web page for the search engines your first priority. It’s not as hard as you think. Basically you need to embed keywords in certain locations, including the HTML tags mentioned in the article.

One of the most prominent locations is the Head tag in the HTML page. You want to put the keywords between the beginning and ending of the Head tag. These will be picked up by the search engines.

However, I want to warn you not to “stuff” keywords. Search engines are on to keyword stuffing and if they pick it up in your web page, your page will drop in the rankings rather than rise.


@David09 - Yes, HTML is static, but you can make it dynamic. When I first began building my personal web page I would do things like mouse rollover effects, using various scripts to do that.

It’s a bit of extra work but these are common techniques and you can find the scripts on the Internet. You can wed these scripts with various HTML tags to dynamically change fonts, background colors and other HTML attributes on the web page.

I don’t know much about web page programming yet I was able to do this quite easily in a manner of minutes.


@MrMoody - In general, I agree, but I’m too old fashioned. Personally, the web design that I do doesn’t aim for too much flash but rather functionality.

I don’t need limitless style possibilities. I can use the HTML font size or HTML font color tags to specify fonts, and I can use a myriad of other tags to indicate other things I need like bolding and underlining.

Yes, I agree that the use of tables is rather stale, but it still works and it gives me a sense of control. Whenever I’ve used CSS in the past I’ve always had the feeling that I lost control, because the style sheets were off to the side somewhere, and I never knew how the actual page would look until the main web page was “married” as it were to the style sheet, rendering the final output.

So standard HTML is static, but gives me more control. That’s the bottom line.


I’ve worked with HTML and I’ve worked with CSS. CSS is better. Frankly, it’s the only way to produce some of the stylized and well ordered web pages you see on the Internet today.

In the old days you put everything in HTML tables, and that was okay as far as it went, but it was very limited. With CSS you can specify styles for just about every element on the web page and you can also indicate how parts of the pages are broken up into different sections, like portions for the body as well as the sidebar and the navigation.

You’re very limited in HTML web design if you want to reproduce comparable results without CSS.

Post your comments
Forgot password?