HTML Body
Published: Tuesday, November 4, 2003
 | HTML body section specifications HTML body section contains the display content of the web page. Web browser displays this information of an HTML document. The body content consists of text, images, graphics, audio, active objects, etc. The body element's presentation attributes are not used anymore in HTML 4.0, although web browsers still support them for backward compatibility (for older webpages). The webpage presentation should be applied using style sheets. Style sheets are covered in style sheet tutorial. Example 1: (Deprecated in HTML 4.0) this may not work in future browsers.
<body bgcolor="white" text="black" link="red" alink="fuchsia" vlink="maroon"> ... document body... </body>
| | Example 2: Using CSS styles (covered in style sheet tutorial)
<head> <title>This Uses Styles</title> <style type="text/css"> body { background: white; color: black } a:link { color: red } a:visited { color: maroon } a:active { color: fuchsia } </style> </head> <body>> ... document body... </body>
|  | Some commonly used <body> attributes Here is a list of commonly used attributes. onload : Alignment attribute - Aligns the element in horizontal direction.
Values - left | center | right
Some related elements - <img>, <input>, <table>, <hr>, <th>, <td>, <tr>, <iframe>.
onunload : Vertical Alignment attribute - Aligns the element in vertical direction.
Values - top | middle | baseline | bottom
Some related elements - <th>, <td>, <tr>, <tbody>.
bgcolor : Width attribute - Specifies the width of an element.
Values - pixels | % of parent width
Some related elements - <table>, <hr>, <iframe>, <img>, <td>, <th>.
lang, dir : Height attribute - Specifies the height of an element.
Values - pixels | % of parent height
Some related elements - <table>, <hr>, <iframe>, <img>, <td>, <th>.
id, class : Width attribute - Specifies the width of an element.
Values - pixels | % of parent cell
Some related elements - <table>, <hr>, <iframe>, <img>, <td>, <th>.
|
|
|
RELATED ARTICLES
|
 |
HTML Tutorial - Introduction
HTML stands for Hyper Text Markup Language. It is the publishing language of the World Wide Web (WWW). Learn about HTML in this tutorial.
|
|
|
|
RELATED NEWS
|
 |
Stareep Debuts the Future of Sleep at CES 2026: A High-End, AI-Driven Mattress System That Transforms the Entire Sleep Cycle
A Global Debut of Its Industry-First AI Smart Mattress System LAS VEGAS and SHENZHEN, China, Dec. 29, 2025 /PRNewswire/ -- St...
|
 |
Fitkol Announces NB Series Featuring SportMind(TM) Intelligent Training System
SHENZHEN, China, Jan. 1, 2026 /PRNewswire/ -- Fitkol today announced the launch of its NB Series of AI-powered treadmills, fe...
|
 |
The World's First Belt-Type Sensing Wearable Device
A Next-Generation Non-Invasive Healthcare Device to Be Unveiled at CES 2026 (Las Vegas) NAGOYA, Japan, Jan. 1, 2026 /PRNewswi...
|
 |
Discover MiniTool's New Screen Recorder: The Perfect Solution for All Your Recording Needs
VANCOUVER, BC, Dec. 24, 2025 /PRNewswire/ -- MiniTool Software Limited has unveiled a new screen recording software : MiniToo...
|
 |
Novel Agent Ianalumab Added to Standard Therapy Extends Time to Treatment Failure in Patients with Previously Treated Immune Thrombocytopenia
LBA-2 : Primary results from VAYHIT2, a randomized, double-blind, phase 3 trial of ianalumab plus eltrombopag versus placebo...
|
|
Submit News |
View More News
|
|
|
|
|
|
|