Category: 

What is an HTML Body Tag?

Article Details
  • Written By: A. Leverkuhn
  • Edited By: Andrew Jones
  • Last Modified Date: 17 September 2016
  • Copyright Protected:
    2003-2016
    Conjecture Corporation
  • Print this Article
Free Widgets for your Site/Blog
Roughly one-fifth of the world's stock of gold - worth over $200 billion USD - is stored under the streets of London.  more...

September 30 ,  1949 :  The Berlin Air Lift ended.  more...

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.

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.

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.

Ad

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.

Ad

You might also Like

Recommended

Discuss this Article

SkyWhisperer
Post 4

@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.

hamje32
Post 3

@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.

David09
Post 2

@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.

MrMoody
Post 1

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

exception 'Exception' with message 'error writing captcha: Duplicate entry '2147483647' for key 'PRIMARY'' in /ssd/www/wisegeek/public_html/_core/classes/public/Captcha.php:44
Stack trace:
#0 /ssd/www/wisegeek/public_html/_core/controls/public/ControlDiscussionPostBox.php(324): Captcha->createCaptcha()
#1 /ssd/www/wisegeek/public_html/framework/classes/Control.php(104): ControlDiscussionPostBox->preRender(false)
#2 /ssd/www/wisegeek/public_html/framework/classes/Control.php(149): Control->render()
#3 /ssd/www/wisegeek/public_html/tpl/default-nocustom-lu/pages/public/article/article.htm(526): Control->__toString()
#4 /ssd/www/wisegeek/public_html/framework/classes/Control.php(300): require('/ssd/www/wisege...')
#5 /ssd/www/wisegeek/public_html/framework/classes/Control.php(309): Control->requireTpl('pages/public/ar...', Object(PageArticleCom), true)
#6 /ssd/www/wisegeek/public_html/framework/classes/Control.php(131): Control->renderTpl('pages/public/ar...', Object(PageArticleCom))
#7 /ssd/www/wisegeek/public_html/framework/classes/FormDataControl.php(87): Control->renderTemplate()
#8 /ssd/www/wisegeek/public_html/framework/classes/Control.php(109): FormDataControl->renderTemplate()
#9 /ssd/www/wisegeek/public_html/framework/classes/ScriptPage.php(50): Control->render(false)
#10 /ssd/www/wisegeek/public_html/framework/classes/Control.php(149): ScriptPage->render()
#11 /ssd/www/wisegeek/public_html/framework/classes/Page.php(97): Control->__toString()
#12 /ssd/www/wisegeek/public_html/_core/classes/public/PublicFrontController.php(443): Page->processRequest()
#13 /ssd/www/wisegeek/public_html/_core/classes/public/PublicFrontController.php(7): PublicFrontController->renderPage()
#14 /ssd/www/wisegeek/public_html/index.php(11): PublicFrontController::run()
#15 {main}