You are here:  NetStrider » Tutorials » HTMLRef » Commands » BODY «

HTML Reference Guide

Author: Randy D. Ralph.   In place March 1, 1999.   Copyright © 1999 NetStrider.   Presented as a public service.

BACK <BODY> Command next

Command Syntax:

<BODY command parameters>
    •    •    •
    HTML Document
    Body Segment

    •    •    •
</BODY>

The <BODY> command defines, sets global display parameters for, and contains the HTML Document Body Segment.  All the contained HTML code is interpreted and displayed by the browser except for comments ( <!--  --> ).

See also:  <HEAD>, <HTML>

Command Parameters: 
background="URL"

  • Declares that the image located at the URL provided will be loaded by the browser and tiled as the background image for the entire web page.

  • A background image overlays any background color established for the web page.

  • Seamlessly tiled background images should be chosen for the most pleasing effect.
text="color name"
text="#color value"
  • defines the default color for all normal text within the entire web page.
  • color names or color values can be used.
  • the default color is black or #000000 unless changed.
link="color name"
link="#color value"
  • defines the default color for all unfollowed hypertext reference links within the entire web page.
  • color names or color values can be used.
  • the default color for all unfollowed hypertext reference links is blue or #0000FF unless changed.
bgcolor="color name"
bgcolor="#color value"
  • hexadecimal #color value for RR red, GG green and BB blue color components in the format #RRGGBB

    Values for RR, GG and BB may range from 00 to FF

  • a standard color name

  • the default page background color is "silver" or "#C0C0C0"

  • any background image declared overlays the background color
See also a discussion of color in HTML
alink="color name"
alink="#color value"
  • defines the default color which will flash momentarily when a hypertext reference link is clicked on
  • color names or color values can be used.
  • the default link flash color is red or #FF0000 unless changed.
vlink="color name"
vlink="#color value"
  • defines the default color for all followed or visited hypertext reference links on the webpage.
  • color names or color values can be used.
  • the default color for all visited hypertext refernce links is red or #FF0000 unless changed.

Internet Explorer Specific Command Parameters: 
bgproperties="fixed"
  • defines the properties of the background image used and has no effect unless used in conjunction with the background paremeter.
  • the only value, fixed, allows the background image to remain static while text and inline images scroll above it.  This can be used to create a watermark effect.  The default is for the background image to scroll along with the page content.
leftmargin="pixels | %"
topmargin="pixels"

Respectively, these parameters control the amount of free space to be allowed at either the left or top of the page as margins.  The left margin space can be expressed either as a percent of the space available or as a pixel value.  The top margin can only be expressed in pixels.

Example:
<BODY background = "http://www.mjd.com/images/backgr.jpg"
      bgcolor    = "dodgerblue"
      text       = "midnightblue"
      link       = "#006699"
      vlink      = "#990066"
      alink      = "orange">

     >>> The entire page contents are contained here. <<<

</BODY>

Note that the <BODY> statement command parameters
have been aligned in the code for ease of viewing.

This <BODY> statement would:

  • load a tiled background image at URL http://www.mjd.com/images/backgr.jpg
  • set the default page background color to dodgerblue
  • set the default text color to midnightblue
  • set the color for unvisited links to #006699 (a bluegreen)
  • set the color for visited links to #990066 (a violet)
  • set the momentary flash color for clicked links to orange
All available command parameters are set.

See also:  <HEAD>, <HTML>
 

Return to Section A:D


Return to the List of Commands
Author: Randy D. Ralph.  In place March 1, 1999.  Copyright © 1999 NetStrider.  World Rights reserved.




Hosted by uCoz