[ acky.net logo ]
Archives
-JavaScripts
-TCL Scripts
-Visual Basic
-CGI Scripts
-Graphics
-Sound Clips

Tutorials
-PhotoShop
-Flash
-JavaScript
-HTML
-IRC/Eggdrops
-Visual Basic
-Perl

Reference
-Windows Tips
-Internet Tips
-Easter Eggs
-Glossary

Listings
-Shell Search

Web Forums
-Announcements
-Shells/Eggdrops
-Visual Basic
-PhotoShop
-Windows Help
-Flash
-HTML
-CGI

Other Services
-Advertise
-Affiliates
-Contacts
-Link to Us
-Report Bugs
-Volunteers
-Web Developing
-Credits

 Home > Tutorials > HTML > Basic Body Tags

Basic Body Tags:

Background | Background Color | Text Color | Link Color | Visited Link Color
Active Link Color
| Onload | onUnload | Full Example | List of body tags


The BODY tag specifies the main content of a document. You should put all content that is to appear in the web page between the <BODY> and </BODY> tags.


Background:  > Back > Top

This attribute specifies an image to display in the background of the document. The URL value can be an absolute URL (for example, "http://www.yourcompany.com/images/image1.htm") or a relative URL (for example, "images/image1.gif"). The image is tiled, which means it is repeated in a grid to fill the entire window or frame where the document is displayed.

Code: preview:
<HTML>
<HEAD>
<TITLE>Acky</TITLE>
</HEAD>
<BODY BACKGROUND="star.gif" >
</BODY>
</HTML>
 


Background Color:  > Back > Top

Sets the color of the background.
List of colors

Code: preview:
<HTML>
<HEAD>
<TITLE>Acky</TITLE>
</HEAD>
<BODY BICOLOR="#000080">
</BODY>
</HTML>
 


Text Color:  > Back > Top

Sets the default color of normal text (that is, text that is not in a link) in the document.
List of colors

Code: preview:
<HTML>
<HEAD>
<TITLE>Acky</TITLE>
</HEAD>
<BODY TEXT="#000080">
<P>This is Navy Blue</P>
</BODY>
</HTML>
This is Navy Blue


Link Color:  > Back > Top

Sets the default text color of unvisited links in the document. An unvisited link is a link that has not been clicked on (or followed).
List of colors

Code: preview:
<HTML>
<HEAD>
<TITLE>Acky</TITLE>
</HEAD>
<BODY
LINK="blue">
</BODY>
</HTML>
http://www.acky.net


Active Link Color:  > Back > Top

Specifies the color to which links briefly change when clicked. After flashing the ALINK color, visited links change to the VLINK color if it has been specified; otherwise they change to the browser's default visited link color.
List of colors

Code: preview:
<HTML>
<HEAD>
<TITLE>Acky</TITLE>
</HEAD>
<BODY
ALINK="red" >
</BODY>
</HTML>
Click


Visited Link Color:  > Back > Top

Specifies the text color of visited (followed) links in a document.
List of colors

Code: preview:
<HTML>
<HEAD>
<TITLE>Acky</TITLE>
</HEAD>
<BODY VLINK="blue">
</BODY>
</HTML>
 


Onload:  > Back > Top

Specifies JavaScript Code to execute when the document finishes loading. There are different attributes that go with the onload tag. This is an example of a message prompt when the page loads.

Code: preview:
<HTML>
<HEAD>
<TITLE>Acky</TITLE>
</HEAD>

<BODY onLoad="window.alert ('Welcome to Acky, your source for web development')">
</BODY>
</HTML>




Click here for preview



onUnload:  > Back > Top

In the following example, onUnload will display a prompt when the user exits a web page. There are other attributes that can go in this event.

Code: example:
<HTML>
<HEAD>
<TITLE>Acky</TITLE>
</HEAD>
<BODY onUnload="window.alert ('Goodbye, Come back soon.')"
</BODY>
</HTML>




Click here for a Preview



Full Example:  > Back > Top

This just shows you how you can have more than one body tag. It shows you how to sets the background color to light yellow, ordinary text to black, unvisited links to blue, visited links to green, and active links to red and prompts the user with a message when the page loads.

Code:  
<HTML>
<HEAD>
<TITLE>Acky</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFAA" TEXT="black" LINK="blue" VLINK="green" ALINK="red" onLoad="window.alert ('Hello, and thank you very much for coming to acky.net')">
</BODY>
</HTML>
 


List of body tags:  > Back > Top

<BODY
  BACKGROUND="bgURL"
  BGCOLOR="color"
  TEXT="color"
  LINK="color"
  ALINK="color"
  VLINK="color"
  ONLOAD="loadJScode"
  ONUNLOAD="unloadJScode"
  ONBLUR="blurJScode"
  ONFOCUS="focusJScode"
  CLASS="styleClass"
  ID="namedPlaceOrStyle"
  LANG="ISO"
  STYLE="style">
</BODY>

 

 


http://www.bsdshellz.net/
http://www.bsdshellz.net/
Email This Page To A Friend

Last updated: Sunday, August 31, 2008 - 10:10 AM Eastern Daylight Time
Legal | Privacy Statement | Problems & Questions | Advertise | Link to us
© 1997-2008, All Rights Reserved.


Dedicated Server Provided by HighSpeedHosting